### Question:
OkrDepartment extends OkrChildUnit { @Override public OkrDepartment getCopyWithoutRelations() { OkrDepartment copy = new OkrDepartment(); copy.setName(this.getName()); copy.setLabel(this.getLabel()); copy.setOkrMasterId(this.getOkrMasterId()); copy.setOkrTopicSponsorId(this.getOkrTopicSponsorId()); copy.setActive(this.isActive); List<UUID> okrMembersIds = new ArrayList<>(this.getOkrMemberIds()); copy.setOkrMemberIds(okrMembersIds); return copy; }  @Override OkrDepartment getCopyWithoutRelations();  }### Answer:
@Test public void getCopyWithoutRelations_expectedNotNull() { OkrDepartment actualOkrDepartment = expectedOkrDepartment.getCopyWithoutRelations(); Assert.assertNotNull(actualOkrDepartment); }
@Test public void getCopyWithoutRelations_expectedCopyNotOriginal() { OkrDepartment actualOkrDepartment = expectedOkrDepartment.getCopyWithoutRelations(); Assert.assertNotEquals(expectedOkrDepartment, actualOkrDepartment); }
@Test public void getCopyWithoutRelations_expectedIdNotCopied() { OkrDepartment actualOkrDepartment = expectedOkrDepartment.getCopyWithoutRelations(); Assert.assertNotEquals(expectedOkrDepartment.getId(), actualOkrDepartment.getId()); }
@Test public void getCopyWithoutRelations_expectedMemberListDeepClone() { OkrDepartment actualOkrDepartment = expectedOkrDepartment.getCopyWithoutRelations(); Assert.assertEquals(originalName, actualOkrDepartment.getName()); Assert.assertEquals(originalLabel, actualOkrDepartment.getLabel()); Assert.assertEquals(originalOkrMasterUuid, actualOkrDepartment.getOkrMasterId()); Assert.assertEquals(originalOkrSponsorUuid, actualOkrDepartment.getOkrTopicSponsorId()); Assert.assertTrue(actualOkrDepartment.isActive()); }
@Test public void getCopyWithoutRelations_expectedCorrectNameList() { OkrDepartment actualOkrDepartment = expectedOkrDepartment.getCopyWithoutRelations(); Assert.assertEquals(originalOkrMembers, actualOkrDepartment.getOkrMemberIds()); Assert.assertNotSame(originalOkrMembers, actualOkrDepartment.getOkrMemberIds()); }
@Test public void getCopyWithoutRelations_expectedNoRelations() { OkrBranch actualDepartment = okrBranch.getCopyWithoutRelations(); Assert.assertNull(actualDepartment.getParentOkrUnit()); Assert.assertEquals(0, actualDepartment.getOkrChildUnits().size()); }