ImmutableJsonField implements JsonField { public static ImmutableJsonField newInstance(final JsonKey key, final JsonValue value) { return newInstance(key, value, null); } private  ImmutableJsonField(final JsonKey theKey, final JsonValue theValue,
            @Nullable final JsonFieldDefinition theDefinition); static ImmutableJsonField newInstance(final JsonKey key, final JsonValue value); static ImmutableJsonField newInstance(final JsonKey key, final JsonValue value,
            @Nullable final JsonFieldDefinition definition); @Override String getKeyName(); @Override JsonKey getKey(); @Override JsonValue getValue(); @Override Optional<JsonFieldDefinition> getDefinition(); @Override boolean isMarkedAs(final JsonFieldMarker fieldMarker, final JsonFieldMarker... furtherFieldMarkers); @Override void writeKeyAndValue(final SerializationContext serializationContext); @SuppressWarnings({"squid:MethodCyclomaticComplexity", "squid:S1067"}) @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullKey() { ImmutableJsonField.newInstance(null, jsonValueMock); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullValue() { ImmutableJsonField.newInstance(jsonKeyMock, null); }