NullFeature implements Feature { public static NullFeature of(final String featureId) { ConditionChecker.checkNotNull(featureId, "ID of the Feature"); final Validator validator = NoControlCharactersNoSlashesValidator.getInstance(featureId); if (!validator.isValid()) { throw JsonKeyInvalidException.newBuilderWithDescription(featureId, validator.getReason().orElse(null)) .build(); } return new NullFeature(featureId); } private  NullFeature(final String featureId); static NullFeature of(final String featureId); @Override String getId(); @Override Optional<FeatureDefinition> getDefinition(); @Override Feature setDefinition(final FeatureDefinition featureDefinition); @Override Feature removeDefinition(); @Override Optional<FeatureProperties> getProperties(); @Override Feature setProperties(final FeatureProperties properties); @Override Feature removeProperties(); @Override Optional<JsonValue> getProperty(final JsonPointer pointer); @Override Feature setProperty(final JsonPointer pointer, final JsonValue propertyValue); @Override Feature removeProperty(final JsonPointer pointer); @Override JsonObject toJson(); @Override JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate); @Override int hashCode(); @SuppressWarnings("squid:MethodCyclomaticComplexity") @Override boolean equals(final Object o); @Override String toString();  }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullFeatureId() { NullFeature.of(null); }