ImmutableFeature implements Feature { public static ImmutableFeature of(final String featureId) { return of(featureId, null, null); } private  ImmutableFeature(final String featureId, @Nullable final FeatureDefinition definition,
            @Nullable final FeatureProperties properties); static ImmutableFeature of(final String featureId); static ImmutableFeature of(final String featureId, @Nullable final FeatureProperties properties); static ImmutableFeature of(final String featureId, @Nullable final FeatureDefinition definition,
            @Nullable final FeatureProperties properties); @Override String getId(); @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 propertyPath); @Override Feature setProperty(final JsonPointer propertyPath, final JsonValue propertyValue); @Override Feature removeProperty(final JsonPointer propertyPath); @Override Optional<FeatureDefinition> getDefinition(); @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() { ImmutableFeature.of(null, FLUX_CAPACITOR_PROPERTIES); }
@Test public void createInstanceWithNullProperties() { final Feature actual = ImmutableFeature.of(KNOWN_FEATURE_ID, null); assertThat(actual.toJsonString()).isEqualTo("{}"); }
@Test public void createInstanceWithLeadingSlash() { assertThatExceptionOfType(JsonKeyInvalidException.class) .isThrownBy(() -> ImmutableFeature.of(LEADING_SLASH_FEATURE_ID, null)); }
@Test public void createInstanceWithEndingSlash() { assertThatExceptionOfType(JsonKeyInvalidException.class) .isThrownBy(() -> ImmutableFeature.of(ENDING_SLASH_FEATURE_ID, null)); }
@Test public void createInstanceWithInbetweenSlash() { assertThatExceptionOfType(JsonKeyInvalidException.class) .isThrownBy(() -> ImmutableFeature.of(SLASH_INBETWEEN_ID, null)); }