### Question:
Mapper { public DriftChangeSetDTO toDTO(MongoDBChangeSet changeSet) { DriftChangeSetDTO dto = new DriftChangeSetDTO(); dto.setId(changeSet.getId()); dto.setResourceId(changeSet.getResourceId()); dto.setDriftDefinitionId(changeSet.getDriftDefinitionId()); dto.setDriftHandlingMode(changeSet.getDriftHandlingMode()); dto.setVersion(changeSet.getVersion()); dto.setCtime(changeSet.getCtime()); dto.setCategory(changeSet.getCategory()); return dto; }  DriftChangeSetDTO toDTO(MongoDBChangeSet changeSet); DriftDTO toDTO(MongoDBChangeSetEntry entry);  }### Answer:
@Test public void mapChangeSetToDTO() { MongoDBChangeSet changeSet = new MongoDBChangeSet(); changeSet.setId(new ObjectId()); changeSet.setCategory(DRIFT); changeSet.setDriftDefinitionId(1); changeSet.setDriftDefinitionName("testdef"); changeSet.setResourceId(1); changeSet.setVersion(1); changeSet.setDriftHandlingMode(normal); Mapper mapper = new Mapper(); DriftChangeSetDTO actual = mapper.toDTO(changeSet); DriftChangeSetDTO expected = new DriftChangeSetDTO(); expected.setId(changeSet.getId()); expected.setCategory(changeSet.getCategory()); expected.setCtime(changeSet.getCtime()); expected.setDriftDefinitionId(changeSet.getDriftDefinitionId()); expected.setResourceId(changeSet.getResourceId()); expected.setDriftHandlingMode(changeSet.getDriftHandlingMode()); expected.setVersion(changeSet.getVersion()); assertPropertiesMatch(expected, actual, "Failed to map " + MongoDBChangeSet.class.getSimpleName() + " to " + DriftChangeSetDTO.class.getSimpleName()); }