DefaultMetadataHeaderKey implements MetadataHeaderKey { public static DefaultMetadataHeaderKey parse(final CharSequence key) { return of(JsonPointer.of(argumentNotEmpty(key, "key"))); } private  DefaultMetadataHeaderKey(final JsonPointer path); static DefaultMetadataHeaderKey parse(final CharSequence key); static DefaultMetadataHeaderKey of(final JsonPointer path); @Override boolean appliesToAllLeaves(); @Override JsonPointer getPath(); @Override int compareTo(final MetadataHeaderKey other); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void tryToParseNullString() { assertThatNullPointerException() .isThrownBy(() -> DefaultMetadataHeaderKey.parse(null)) .withMessage("The key must not be null!") .withNoCause(); }
@Test public void tryToParseEmptyString() { assertThatIllegalArgumentException() .isThrownBy(() -> DefaultMetadataHeaderKey.parse("")) .withMessage("The argument 'key' must not be empty!") .withNoCause(); }