MethodParameterImpl implements Parameter { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Objects.hashCode(this.name); result = prime * result + Objects.hashCode(this.type); return result; } MethodParameterImpl(final String name, final Type type); @Override String getName(); @Override Type getType(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test public void testHashCode() { assertEquals(hash1,hash2); assertTrue(!(hash1 == hash3)); assertTrue(!(hash1 == hash4)); }