public function testServiceLocateInstantiation()
{
$result = Libraries::instance('adapter.template.view', 'Simple');
$this->assertInstanceOf('lithium\\template\\view\\adapter\\Simple', $result);
$expected = "Class `Foo` of type `adapter.template.view` not found.";
$this->assertException($expected, function () {
Libraries::instance('adapter.template.view', 'Foo');
});
}