@Test public void shouldBeAbleToConvertAAuthorityIntoAAuthorityRepresentation() { Authority authority = authority().build(); AuthorityRepresentation representation = authorityConversionService.convert(authority); assertThat(representation.getId()).isEqualTo(authority.getId()); assertThat(representation.getCreated()).isEqualTo(authority.getCreated()); assertThat(representation.getUpdated()).isEqualTo(authority.getUpdated()); assertThat(representation.getName()).isEqualTo(authority.getName()); assertThat(representation.getDescription()).isEqualTo(authority.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);  }