@Test public void shouldBeAbleToConvertARoleRepresentationIntoANewRole() { RoleRepresentation representation = RoleDSL.role().build(); Role role = roleConversionService.convert(representation); assertThat(role.getName()).isEqualTo(representation.getName()); assertThat(role.getDescription()).isEqualTo(representation.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);  }