@Test public void shouldBeAbleToConvertAAudienceIntoAAudienceRepresentation() { Audience audience = audience().build(); AudienceRepresentation representation = audienceConversionService.convert(audience); assertThat(representation.getId()).isEqualTo(audience.getId()); assertThat(representation.getCreated()).isEqualTo(audience.getCreated()); assertThat(representation.getUpdated()).isEqualTo(audience.getUpdated()); assertThat(representation.getName()).isEqualTo(audience.getName()); assertThat(representation.getDescription()).isEqualTo(audience.getDescription()); }
public Audience convert(AudienceRepresentation representation) { Audience audience = new Audience(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }
AudienceConversionService { public Audience convert(AudienceRepresentation representation) { Audience audience = new Audience(representation.getName()); audience.setDescription(representation.getDescription()); return audience; } }
AudienceConversionService { public Audience convert(AudienceRepresentation representation) { Audience audience = new Audience(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }  }
AudienceConversionService { public Audience convert(AudienceRepresentation representation) { Audience audience = new Audience(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }  Audience convert(AudienceRepresentation representation); AudienceRepresentation convert(Audience audience); Audience convert(AudienceRepresentation representation, Audience audience); }
AudienceConversionService { public Audience convert(AudienceRepresentation representation) { Audience audience = new Audience(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }  Audience convert(AudienceRepresentation representation); AudienceRepresentation convert(Audience audience); Audience convert(AudienceRepresentation representation, Audience audience);  }