ThingTag extends AbstractEntityIdWithRevision<ThingId> { public static ThingTag fromJson(final JsonObject jsonObject) { checkNotNull(jsonObject, "JSON object"); final ThingId thingId = ThingId.of(jsonObject.getValueOrThrow(JsonFields.ID)); final Long revision = jsonObject.getValueOrThrow(JsonFields.REVISION); return new ThingTag(thingId, revision); } private  ThingTag(final ThingId id, final long revision); static ThingTag of(final ThingId id, final long revision); static ThingTag fromJson(final JsonObject jsonObject);  }
@Test public void createInstanceFromValidJson() { final ThingTag underTest = ThingTag.fromJson(KNOWN_JSON); Assertions.assertThat(underTest).isNotNull(); Assertions.assertThat((CharSequence) underTest.getEntityId()).isEqualTo(TestConstants.Thing.THING_ID); Assertions.assertThat(underTest.getRevision()).isEqualTo(TestConstants.Thing.REVISION_NUMBER); }