@Test public void shouldBeAbleToConvertARoleIntoARoleRepresentation() { Role role = role().build(); RoleRepresentation representation = roleConversionService.convert(role); assertThat(representation.getId()).isEqualTo(role.getId()); assertThat(representation.getCreated()).isEqualTo(role.getCreated()); assertThat(representation.getUpdated()).isEqualTo(role.getUpdated()); assertThat(representation.getName()).isEqualTo(role.getName()); assertThat(representation.getDescription()).isEqualTo(role.getDescription()); }
public Role convert(RoleRepresentation representation) { Role role = new Role(representation.getName()); role.setDescription(representation.getDescription()); return role; }
RoleConversionService { public Role convert(RoleRepresentation representation) { Role role = new Role(representation.getName()); role.setDescription(representation.getDescription()); return role; } }
RoleConversionService { public Role convert(RoleRepresentation representation) { Role role = new Role(representation.getName()); role.setDescription(representation.getDescription()); return role; }  }
RoleConversionService { public Role convert(RoleRepresentation representation) { Role role = new Role(representation.getName()); role.setDescription(representation.getDescription()); return role; }  Role convert(RoleRepresentation representation); RoleRepresentation convert(Role role); Role convert(RoleRepresentation representation, Role role); }
RoleConversionService { public Role convert(RoleRepresentation representation) { Role role = new Role(representation.getName()); role.setDescription(representation.getDescription()); return role; }  Role convert(RoleRepresentation representation); RoleRepresentation convert(Role role); Role convert(RoleRepresentation representation, Role role);  }