ImmutableFeatureFromCopyBuilder implements FeatureBuilder, FeatureBuilder.FromCopyBuildable { public static ImmutableFeatureFromCopyBuilder of(final Feature feature) { checkNotNull(feature, "Feature"); final ImmutableFeatureFromCopyBuilder result = new ImmutableFeatureFromCopyBuilder(feature.getId()); result.properties(feature.getProperties().orElse(null)); result.definition(feature.getDefinition().orElse(null)); return result; } private  ImmutableFeatureFromCopyBuilder(final String theFeatureId); static ImmutableFeatureFromCopyBuilder of(final Feature feature); @Override FromCopyBuildable definition(@Nullable final FeatureDefinition featureDefinition); @Override FromCopyBuildable properties(@Nullable final FeatureProperties properties); @Override FromCopyBuildable properties(@Nullable final JsonObject properties); @Override FromCopyBuildable properties(final Function<FeatureProperties, FeatureProperties> transform); @Override FromCopyBuildable setId(final String featureId); @Override FromCopyBuildable setId(final Predicate<String> existingIdPredicate, final String featureId); @Override Feature build();  }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceOfNullFeature() { ImmutableFeatureFromCopyBuilder.of(null); }