@Test public void shouldBeAbleToConvertAAuthorityRepresentationIntoAnExistingAuthority() { AuthorityRepresentation representation = AuthorityDSL.authority().build(); Authority authority = authority().build(); Authority updated = authorityConversionService.convert(representation, authority); assertThat(updated.getId()).isEqualTo(authority.getId()); assertThat(updated.getCreated()).isEqualTo(authority.getCreated()); assertThat(updated.getUpdated()).isEqualTo(authority.getUpdated()); assertThat(updated.getName()).isEqualTo(representation.getName()); assertThat(updated.getDescription()).isEqualTo(representation.getDescription()); }
public Authority convert(AuthorityRepresentation representation) { Authority authority = new Authority(representation.getName()); authority.setDescription(representation.getDescription()); return authority; }
AuthorityConversionService { public Authority convert(AuthorityRepresentation representation) { Authority authority = new Authority(representation.getName()); authority.setDescription(representation.getDescription()); return authority; } }
AuthorityConversionService { public Authority convert(AuthorityRepresentation representation) { Authority authority = new Authority(representation.getName()); authority.setDescription(representation.getDescription()); return authority; }  }
AuthorityConversionService { public Authority convert(AuthorityRepresentation representation) { Authority authority = new Authority(representation.getName()); authority.setDescription(representation.getDescription()); return authority; }  Authority convert(AuthorityRepresentation representation); AuthorityRepresentation convert(Authority authority); Authority convert(AuthorityRepresentation representation, Authority authority); }
AuthorityConversionService { public Authority convert(AuthorityRepresentation representation) { Authority authority = new Authority(representation.getName()); authority.setDescription(representation.getDescription()); return authority; }  Authority convert(AuthorityRepresentation representation); AuthorityRepresentation convert(Authority authority); Authority convert(AuthorityRepresentation representation, Authority authority);  }