@Test public void testHashCode() throws NoSuchMethodException { assertEquals(stringParameter.hashCode(), stringParameter.hashCode()); assertEquals(longParameter.hashCode(), longParameter.hashCode()); assertEquals(intReturnType.hashCode(), intReturnType.hashCode()); Method method = getClass().getMethod("method", String.class, Long.TYPE); SynthesizingMethodParameter methodParameter = new SynthesizingMethodParameter(method, 0); assertEquals(stringParameter.hashCode(), methodParameter.hashCode()); assertNotEquals(longParameter.hashCode(), methodParameter.hashCode()); }