@Test public void shouldBeAbleToConvertAScopeIntoAScopeRepresentation() { Scope scope = scope().build(); ScopeRepresentation representation = scopeConversionService.convert(scope); assertThat(representation.getId()).isEqualTo(scope.getId()); assertThat(representation.getCreated()).isEqualTo(scope.getCreated()); assertThat(representation.getUpdated()).isEqualTo(scope.getUpdated()); assertThat(representation.getName()).isEqualTo(scope.getName()); assertThat(representation.getDescription()).isEqualTo(scope.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);  }