### Question:
ObjectFactDaoFacade implements ObjectFactDao { @Override public ObjectRecord getObject(UUID id) { return objectRecordConverter.fromEntity(objectManager.getObject(id)); } @Inject  ObjectFactDaoFacade(ObjectManager objectManager,
                             FactManager factManager,
                             FactSearchManager factSearchManager,
                             ObjectRecordConverter objectRecordConverter,
                             FactRecordConverter factRecordConverter,
                             FactAclEntryRecordConverter factAclEntryRecordConverter,
                             FactCommentRecordConverter factCommentRecordConverter,
                             Consumer<FactRecord> dcReplicationConsumer); @Override ObjectRecord getObject(UUID id); @Override ObjectRecord getObject(String type, String value); @Override ObjectRecord storeObject(ObjectRecord record); @Override ObjectStatisticsContainer calculateObjectStatistics(ObjectStatisticsCriteria criteria); @Override ResultContainer<ObjectRecord> searchObjects(FactSearchCriteria criteria); @Override FactRecord getFact(UUID id); @Override FactRecord storeFact(FactRecord record); @Override FactRecord refreshFact(FactRecord record); @Override FactRecord retractFact(FactRecord record); @Override ResultContainer<FactRecord> retrieveExistingFacts(FactRecord record); @Override ResultContainer<FactRecord> searchFacts(FactSearchCriteria criteria); @Override FactAclEntryRecord storeFactAclEntry(FactRecord fact, FactAclEntryRecord aclEntry); @Override FactCommentRecord storeFactComment(FactRecord fact, FactCommentRecord comment);  }### Answer:
@Test public void testGetObjectById() { UUID id = UUID.randomUUID(); ObjectEntity entity = new ObjectEntity(); ObjectRecord record = new ObjectRecord(); when(objectManager.getObject(id)).thenReturn(entity); when(objectRecordConverter.fromEntity(entity)).thenReturn(record); assertSame(record, dao.getObject(id)); verify(objectManager).getObject(id); verify(objectRecordConverter).fromEntity(entity); }
@Test public void testGetObjectByTypeValue() { String type = "type"; String value = "value"; ObjectEntity entity = new ObjectEntity(); ObjectRecord record = new ObjectRecord(); when(objectManager.getObject(type, value)).thenReturn(entity); when(objectRecordConverter.fromEntity(entity)).thenReturn(record); assertSame(record, dao.getObject(type, value)); verify(objectManager).getObject(type, value); verify(objectRecordConverter).fromEntity(entity); }