@Test public void shouldBeAbleToConvertAScopeRepresentationIntoANewScope() { ScopeRepresentation representation = ScopeDSL.scope().build(); Scope scope = scopeConversionService.convert(representation); assertThat(scope.getName()).isEqualTo(representation.getName()); assertThat(scope.getDescription()).isEqualTo(representation.getDescription()); }
public Scope convert(ScopeRepresentation representation) { Scope audience = new Scope(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }
ScopeConversionService { public Scope convert(ScopeRepresentation representation) { Scope audience = new Scope(representation.getName()); audience.setDescription(representation.getDescription()); return audience; } }
ScopeConversionService { public Scope convert(ScopeRepresentation representation) { Scope audience = new Scope(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }  }
ScopeConversionService { public Scope convert(ScopeRepresentation representation) { Scope audience = new Scope(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }  Scope convert(ScopeRepresentation representation); ScopeRepresentation convert(Scope scope); Scope convert(ScopeRepresentation representation, Scope scope); }
ScopeConversionService { public Scope convert(ScopeRepresentation representation) { Scope audience = new Scope(representation.getName()); audience.setDescription(representation.getDescription()); return audience; }  Scope convert(ScopeRepresentation representation); ScopeRepresentation convert(Scope scope); Scope convert(ScopeRepresentation representation, Scope scope);  }