@Test public void shouldBeAbleToConvertAAudienceRepresentationIntoANewAudience() { AudienceRepresentation representation = AudienceDSL.audience().build(); Audience audience = audienceConversionService.convert(representation); assertThat(audience.getName()).isEqualTo(representation.getName()); assertThat(audience.getDescription()).isEqualTo(representation.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);  }