### Question:
OkrBranchMapper implements DataMapper<OkrBranch, OkrBranchDto> { @Override public OkrBranch mapDtoToEntity(OkrBranchDto dto) { OkrBranch entity = new OkrBranch(); entity.setId(dto.getOkrUnitId()); entity.setName(dto.getUnitName()); entity.setLabel(dto.getLabel()); entity.setActive(dto.getIsActive()); return entity; }  @Override OkrBranch mapDtoToEntity(OkrBranchDto dto); @Override OkrBranchDto mapEntityToDto(OkrBranch entity); @Override Collection<OkrBranch> mapDtosToEntities(Collection<OkrBranchDto> input); @Override Collection<OkrBranchDto> mapEntitiesToDtos(Collection<OkrBranch> entities);  }### Answer:
@Test public void test_mapDtoToEntity_expectObjectiveListEmpty2() { entity = mapper.mapDtoToEntity(dto); Assert.assertTrue(entity.getObjectives().isEmpty()); }
@Test public void test_mapDtoToEntity_expectDepartmentListEmpty() { dto.setOkrChildUnitIds(Arrays.asList(1L, 2L)); entity = mapper.mapDtoToEntity(dto); Assert.assertTrue(entity.getOkrChildUnits().isEmpty()); }
@Test public void test_mapDtoToEntity_expectDepartmentListEmpty2() { entity = mapper.mapDtoToEntity(dto); Assert.assertTrue(entity.getOkrChildUnits().isEmpty()); }
@Test public void test_mapDtoToEntity_expectIdIsMapped() { Long expectId = 4L; dto.setOkrUnitId(expectId); entity = mapper.mapDtoToEntity(dto); Assert.assertEquals(expectId, entity.getId()); }
@Test public void test_mapDtoToEntity_expectNameIsMapped() { String expectedName = "myNameIS"; dto.setUnitName(expectedName); entity = mapper.mapDtoToEntity(dto); Assert.assertEquals(expectedName, entity.getName()); }
@Test public void test_mapDtoToEntity_expectParentUnitIsNull() { entity = mapper.mapDtoToEntity(dto); Assert.assertNull(entity.getParentOkrUnit()); }
@Test public void test_mapDtoToEntity_expectParentUnitIsNull2() { dto.setParentUnitId(12L); entity = mapper.mapDtoToEntity(dto); Assert.assertNull(entity.getParentOkrUnit()); }
@Test public void test_mapDtoToEntity_expectObjectiveListEmpty() { dto.setObjectiveIds(Arrays.asList(1L, 2L)); entity = mapper.mapDtoToEntity(dto); Assert.assertTrue(entity.getObjectives().isEmpty()); }