class ImmutableThingFromScratchBuilder implements ThingBuilder, ThingBuilder.FromScratch {

    @Override
    public FromScratch setFeatureDefinition(final String featureId, final FeatureDefinition featureDefinition) {
        checkNotNull(featureDefinition, "Feature Definition to be set");
        invokeOnFeaturesBuilder(fb -> fb.set(fb.get(featureId)
                .map(feature -> feature.setDefinition(featureDefinition))
                .orElseGet(() -> ThingsModelFactory.newFeature(featureId, featureDefinition))));
        return this;
    }

    private  ImmutableThingFromScratchBuilder();

}