### Question:
ObjectManager implements LifecycleAspect { public Iterator<ObjectFactBindingEntity> fetchObjectFactBindings(UUID id) { if (id == null) return Collections.emptyIterator(); return objectDao.fetchObjectFactBindings(id).iterator(); } @Inject  ObjectManager(ClusterManager clusterManager); @Override void startComponent(); @Override void stopComponent(); ObjectTypeEntity getObjectType(UUID id); ObjectTypeEntity getObjectType(String name); List<ObjectTypeEntity> fetchObjectTypes(); ObjectTypeEntity saveObjectType(ObjectTypeEntity type); ObjectEntity getObject(UUID id); ObjectEntity getObject(String type, String value); Iterator<ObjectEntity> getObjects(List<UUID> id); ObjectEntity saveObject(ObjectEntity object); Iterator<ObjectFactBindingEntity> fetchObjectFactBindings(UUID id); ObjectFactBindingEntity saveObjectFactBinding(ObjectFactBindingEntity binding);  }### Answer:
@Test public void testSaveAndFetchObjectFactBindings() { ObjectEntity object = createAndSaveObject(createAndSaveObjectType().getId()); ObjectFactBindingEntity binding = createAndSaveObjectFactBinding(object.getId()); List<ObjectFactBindingEntity> actual = ListUtils.list(getObjectManager().fetchObjectFactBindings(object.getId())); assertEquals(1, actual.size()); assertObjectFactBinding(binding, actual.get(0)); }
@Test public void testFetchObjectFactBindingsWithNonExistingObject() { assertEquals(0, ListUtils.list(getObjectManager().fetchObjectFactBindings(null)).size()); assertEquals(0, ListUtils.list(getObjectManager().fetchObjectFactBindings(UUID.randomUUID())).size()); }