final PhotoDatabase photoDb = new PhotoDatabaseImpl(10);
beanProvider.add("photoDb", photoDb);
beanProvider.add("albumDb", new AlbumDatabaseImpl(10));
beanProvider.add("albumEntryDb", new AlbumEntryDatabaseImpl(photoDb, 3));
final InjectResourceFactory factory = new InjectResourceFactory(beanProvider);
final Map<String, ResourceModel> pathRootResourceMap =
buildResourceModels(PhotoResource.class, AlbumResource.class, AlbumEntryResource.class);
factory.setRootResources(pathRootResourceMap);
_photoRes = factory.create(PhotoResource.class);
Assert.assertNotNull(_photoRes);
Assert.assertNotNull(_photoRes.getDb());
_albumRes = factory.create(AlbumResource.class);
Assert.assertNotNull(_albumRes);
Assert.assertNotNull(_albumRes.getDb());
_entryRes = factory.create(AlbumEntryResource.class);
Assert.assertNotNull(_entryRes);
makeData();
}