StructuralKey { public static StructuralKey<?> empty() { return new StructuralKey<Object>() { @Override public Object getKey() { return this; } }; } private  StructuralKey(); abstract K getKey(); static StructuralKey<?> empty(); static StructuralKey<K> of(K key, Coder<K> coder);  }
@Test public void emptyKeysNotEqual() { StructuralKey<?> empty = StructuralKey.empty(); Assert.assertThat(empty, Matchers.not(Matchers.equalTo(StructuralKey.empty()))); Assert.assertThat(empty, Matchers.equalTo(empty)); }