@Test
public void resourceKeysFromDifferentInstantiationsAreEqual() {

    final ResourceKey key1 = PoliciesModelFactory.newResourceKey("thing:/foo/bar");
    final ResourceKey key2 = PoliciesModelFactory.newResourceKey("thing", JsonFactory.newPointer("/foo/bar"));
    final ResourceKey key3 = PoliciesModelFactory.newResourceKey(JsonPointer.of("thing:/foo/bar"));
    final ResourceKey key4 =
            PoliciesModelFactory.newResourceKey(JsonPointer.of("thing:").append(JsonPointer.of("foo/bar")));
    assertThat(key1).isEqualTo(key2);
    assertThat(key1).isEqualTo(key3);
    assertThat(key1).isEqualTo(key4);
}