BasicTag implements Tag { @Override public int hashCode() { return Arrays.hashCode(new String[] { key, value }); } BasicTag(String key, String value); @Override String key(); @Override String value(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testHashCode() { BasicTag tag = new BasicTag("k1", "v1"); Assert.assertEquals(tag.hashCode(), new BasicTag(tag.key(), tag.value()).hashCode()); }