svoid test_ParameterizedTypeImpl() { class X { LS bla; } Type a = genericFieldType(X.class, "bla"); Type b = ParameterizedTypeImpl(null, L.class, S.class); assertEqualsBothDirectionsVerbose(a, b); b = ParameterizedTypeImpl(null, L.class, L.class); assertNotEqualsBothDirectionsVerbose(a, b); b = ParameterizedTypeImpl(null, Optional.class, S.class); assertNotEqualsBothDirectionsVerbose(a, b); }