PolicyTag extends AbstractEntityIdWithRevision<PolicyId> { public static PolicyTag of(final PolicyId policyId, final long revision) { return new PolicyTag(policyId, revision); } private  PolicyTag(final PolicyId policyId, final long revision); static PolicyTag of(final PolicyId policyId, final long revision); static PolicyTag fromJson(final JsonObject jsonObject);  }
@Test public void toJsonReturnsExpected() { final PolicyTag underTest = PolicyTag.of(TestConstants.Policy.POLICY_ID, TestConstants.Policy.REVISION_NUMBER); final JsonValue jsonValue = underTest.toJson(); assertThat(jsonValue).isEqualTo(KNOWN_JSON); }