@Test public void testHaveHashCodeOfValue() { String value = "someValue"; ObjectTemplate objectTemplate = new ObjectTemplate("key", value); assertEquals(objectTemplate.hashCode(), value.hashCode(), "Should implement hashCode on the template value"); assertEquals(objectTemplate.hashCode(), value.hashCode(), "objectTemplate hashCode and value hashCode should be same"); }
@Override public int hashCode() { return value.hashCode(); }
ObjectTemplate implements Template { @Override public int hashCode() { return value.hashCode(); } }
ObjectTemplate implements Template { @Override public int hashCode() { return value.hashCode(); } ObjectTemplate(Object key, Object value); }
ObjectTemplate implements Template { @Override public int hashCode() { return value.hashCode(); } ObjectTemplate(Object key, Object value); Object getKey(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
ObjectTemplate implements Template { @Override public int hashCode() { return value.hashCode(); } ObjectTemplate(Object key, Object value); Object getKey(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }