### Question:
TeamTransformer { TeamDTO toDto(Team team) { TeamDTO result = new TeamDTO(); result.setId(0L); if (null != team) { result.setId(team.getId()); result.setName(team.getName()); result.setAssignableToProblems(team.isAssignableToProblems()); result.setAssignableToFunctionalities(team.isAssignableToFunctionalities()); } return result; }    }### Answer:
@Test public void toDto_should_transform_the_object() { Team team = new Team(1L, 35L, "name", true, true, new ArrayList<>()); TeamDTO result = cut.toDto(team); Assertions.assertThat(result).isNotNull(); Assertions.assertThat(result.getId()).isEqualTo(1L); Assertions.assertThat(result.getName()).isEqualTo("name"); Assertions.assertThat(result.isAssignableToFunctionalities()).isTrue(); Assertions.assertThat(result.isAssignableToProblems()).isTrue(); }
@Test public void toDto_should_return_empty_object_on_null() { TeamDTO result = cut.toDto(null); Assertions.assertThat(result).isNotNull(); Assertions.assertThat(result.getId()).isEqualTo(0L); Assertions.assertThat(result.getName()).isNull(); Assertions.assertThat(result.isAssignableToFunctionalities()).isFalse(); Assertions.assertThat(result.isAssignableToProblems()).isFalse(); }