@Test public void shouldBeAbleToConvertAGrantTypeRepresentationIntoANewGrantType() { GrantTypeRepresentation representation = GrantTypeDSL.grantType().build(); GrantType grantType = grantTypeConversionService.convert(representation); assertThat(grantType.getName()).isEqualTo(representation.getName()); assertThat(grantType.getDescription()).isEqualTo(representation.getDescription()); }
public GrantTypeRepresentation convert(GrantType grantType) { GrantTypeRepresentation representation = new GrantTypeRepresentation(grantType.getId()); representation.setCreated(grantType.getCreated()); representation.setUpdated(grantType.getUpdated()); representation.setName(grantType.getName()); representation.setDescription(grantType.getDescription()); return representation; }
GrantTypeConversionService { public GrantTypeRepresentation convert(GrantType grantType) { GrantTypeRepresentation representation = new GrantTypeRepresentation(grantType.getId()); representation.setCreated(grantType.getCreated()); representation.setUpdated(grantType.getUpdated()); representation.setName(grantType.getName()); representation.setDescription(grantType.getDescription()); return representation; } }
GrantTypeConversionService { public GrantTypeRepresentation convert(GrantType grantType) { GrantTypeRepresentation representation = new GrantTypeRepresentation(grantType.getId()); representation.setCreated(grantType.getCreated()); representation.setUpdated(grantType.getUpdated()); representation.setName(grantType.getName()); representation.setDescription(grantType.getDescription()); return representation; }  }
GrantTypeConversionService { public GrantTypeRepresentation convert(GrantType grantType) { GrantTypeRepresentation representation = new GrantTypeRepresentation(grantType.getId()); representation.setCreated(grantType.getCreated()); representation.setUpdated(grantType.getUpdated()); representation.setName(grantType.getName()); representation.setDescription(grantType.getDescription()); return representation; }  GrantTypeRepresentation convert(GrantType grantType); GrantType convert(GrantTypeRepresentation representation); GrantType convert(GrantTypeRepresentation representation, GrantType grantType); }
GrantTypeConversionService { public GrantTypeRepresentation convert(GrantType grantType) { GrantTypeRepresentation representation = new GrantTypeRepresentation(grantType.getId()); representation.setCreated(grantType.getCreated()); representation.setUpdated(grantType.getUpdated()); representation.setName(grantType.getName()); representation.setDescription(grantType.getDescription()); return representation; }  GrantTypeRepresentation convert(GrantType grantType); GrantType convert(GrantTypeRepresentation representation); GrantType convert(GrantTypeRepresentation representation, GrantType grantType);  }