ConnectionTag extends AbstractEntityIdWithRevision<ConnectionId> { public static ConnectionTag of(final ConnectionId id, final long revision) { return new ConnectionTag(id, revision); } private  ConnectionTag(final ConnectionId id, final long revision); static ConnectionTag of(final ConnectionId id, final long revision); static ConnectionTag fromJson(final JsonObject jsonObject);  }
@Test public void toJsonReturnsExpected() { final ConnectionTag underTest = ConnectionTag.of(CONNECTION_ID, REVISION); final JsonValue jsonValue = underTest.toJson(); assertThat(jsonValue).isEqualTo(KNOWN_JSON); }