### Question:
Key { @Override public int hashCode() { return 407 + 11 * type.hashCode() + qualifier.hashCode(); } protected  Key(TypeLiteral<T> type, String bindingName); protected  Key(TypeLiteral<T> type, Class<? extends Annotation> annotationType); protected  Key(TypeLiteral<T> type, Annotation annotationInstance); static Key<T> get(Class<T> type); static Key<T> get(Class<T> type, String bindingName); static Key<T> get(Class<T> type, Class<? extends Annotation> annotationType); static Key<T> get(Class<T> type, Annotation annotationInstance); static Key<T> get(TypeLiteral<T> typeLiteral); static Key<T> get(TypeLiteral<T> typeLiteral, String bindingName); static Key<T> get(TypeLiteral<T> typeLiteral, Class<? extends Annotation> annotationType); static Key<T> get(TypeLiteral<T> typeLiteral, Annotation annotationInstance); static Key<List<T>> getListOf(Class<T> type, Class<? extends Annotation> qualifier); static Key<List<T>> getListOf(Class<T> type, String bindingName); static Key<List<T>> getListOf(Class<T> type); static Key<Set<T>> getSetOf(Class<T> valueType, Class<? extends Annotation> qualifier); static Key<Set<T>> getSetOf(Class<T> valueType, String bindingName); static Key<Set<T>> getSetOf(Class<T> valueType); static Key<Map<K, V>> getMapOf(Class<K> keyType, Class<V> valueType, Class<? extends Annotation> qualifier); static Key<Map<K, V>> getMapOf(Class<K> keyType, Class<V> valueType, String bindingName); static Key<Map<K, V>> getMapOf(Class<K> keyType, Class<V> valueType); static Key<Map<K, V>> getMapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType, Class<? extends Annotation> qualifier); static Key<Map<K, V>> getMapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType, String bindingName); static Key<Map<K, V>> getMapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType); static Key<Optional<T>> getOptionalOf(Class<? extends T> type); static Key<Optional<T>> getOptionalOf(Key<T> key); TypeLiteral<T> getType(); String getBindingName(); Class<? extends Annotation> getBindingAnnotation(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testHashCode() { Key<String> key1 = Key.get(String.class); Key<String> key2 = Key.get(String.class); Key<Integer> key3 = Key.get(Integer.class); Key<Integer> key4 = Key.get(Integer.class, "a"); Key<Integer> key5 = Key.get(Integer.class, "a"); Key<Integer> key6 = Key.get(Integer.class, "b"); Key<String> key7 = Key.get(String.class, "a"); assertEquals("generated different hashcode on second invocation", key1.hashCode(), key1.hashCode()); assertEquals(key1.hashCode(), key2.hashCode()); assertEquals(key4.hashCode(), key5.hashCode()); assertNotEquals(key1.hashCode(), key3.hashCode()); assertNotEquals(key4.hashCode(), key3.hashCode()); assertNotEquals(key5.hashCode(), key6.hashCode()); assertNotEquals(key7.hashCode(), key4.hashCode()); }