JcrNs implements JsonObjectConvertible, Comparable<JcrNs> { @Override public JsonObject toJson() { final JsonKeys keys = keys(); return key(keys.prefix(), getPrefix()).key(keys.uri(), getUri()).get(); }  @NotNull static JcrNs.JsonKeys keys(); String getPrefix(); void setPrefix(String prefix); String getUri(); void setUri(String uri); static @Nullable JcrNs fromJson(final @NotNull JsonObject json); static @NotNull JcrNs create(final @NotNull String prefix, final @NotNull String uri); @Override boolean equals(final Object o); @Override int hashCode(); @Override JsonObject toJson(); @Override String toString(); @Override int compareTo(final @NotNull JcrNs o);  }
@Test public void testToJson() { JsonObject expect = key(KEYS.prefix(), prefix).key(KEYS.uri(), uri).get(); JcrNs complete = JcrNs.create(prefix, uri); assertEquals("expect json", expect, complete.toJson()); }