ImmutableJsonKey implements JsonKey { public static JsonKey of(final CharSequence keyValue) { requireNonNull(keyValue, "The key string must not be null!"); if (JsonKey.class.isAssignableFrom(keyValue.getClass())) { return ((JsonKey) keyValue); } else if (0 == keyValue.length()) { throw new IllegalArgumentException("The key string must not be empty!"); } return new ImmutableJsonKey(keyValue.toString()); } private  ImmutableJsonKey(final String theKeyValue); static JsonKey of(final CharSequence keyValue); @Override JsonPointer asPointer(); @Override int length(); @Override char charAt(final int index); @Override CharSequence subSequence(final int start, final int end); @Override boolean equals(final Object o); @Override int hashCode(); @Override @Nonnull String toString();  }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullKeyValue() { ImmutableJsonKey.of(null); }
@Test(expected = IllegalArgumentException.class) public void tryToCreateInstanceWithEmptyKeyValue() { ImmutableJsonKey.of(""); }