### Question:
DefaultParameterizedType implements ParameterizedType { @Override public boolean equals(Object object) { if (!(object instanceof ParameterizedType)) { return false; } ParameterizedType type = (ParameterizedType) object; if (type == this) { return true; } return Utils.nullEquals(ownerType, type.getOwnerType()) && rawType.equals(type.getRawType()) && Arrays.equals(actualTypeArguments, type.getActualTypeArguments()); } DefaultParameterizedType(Type ownerType, Class<?> rawType, Type[] actualTypeArguments); Type getOwnerType(); Type getRawType(); Type[] getActualTypeArguments(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static String toString(ParameterizedType type); static String toString(ParameterizedType type, ClassSerializer serializer);  }### Answer:
@Test public void equalsWithDifferentClass() { ParameterizedType type = new DefaultParameterizedType(null, List.class, new Type[] {String.class}); assertFalse(type.equals(new Object())); }
@Test public void equalsWithUnequalOwnerType() { ParameterizedType type1 = new DefaultParameterizedType(Map.class, Map.Entry.class, new Type[] {String.class, Integer.class}); ParameterizedType type2 = new DefaultParameterizedType(List.class, Map.Entry.class, new Type[] {String.class, Integer.class}); assertFalse(type1.equals(type2)); }
@Test public void equalsWithUnequalRawType() { ParameterizedType type1 = new DefaultParameterizedType(null, List.class, new Type[] {String.class}); ParameterizedType type2 = new DefaultParameterizedType(null, Set.class, new Type[] {String.class}); assertFalse(type1.equals(type2)); }
@Test public void equalsWithUnequalActualTypeArguments() { ParameterizedType type1 = new DefaultParameterizedType(null, List.class, new Type[] {String.class}); ParameterizedType type2 = new DefaultParameterizedType(null, List.class, new Type[] {Integer.class}); assertFalse(type1.equals(type2)); }