### Question:
UForAll extends UType { public static UForAll create(List<UTypeVar> typeVars, UType quantifiedType) { return new AutoValue_UForAll(ImmutableList.copyOf(typeVars), quantifiedType); }  static UForAll create(List<UTypeVar> typeVars, UType quantifiedType); abstract ImmutableList<UTypeVar> getTypeVars(); abstract UType getQuantifiedType(); @Override Choice<Unifier> visitForAll(ForAll target, Unifier unifier); @Override Type inline(Inliner inliner);  }### Answer:
@Test public void equality() { UType objectType = UClassType.create("java.lang.Object", ImmutableList.<UType>of()); UTypeVar eType = UTypeVar.create("E", objectType); UTypeVar tType = UTypeVar.create("T", objectType); UType listOfEType = UClassType.create("java.util.List", ImmutableList.<UType>of(eType)); new EqualsTester() .addEqualityGroup(UForAll.create(ImmutableList.of(eType), eType)) .addEqualityGroup(UForAll.create(ImmutableList.of(eType), listOfEType)) .addEqualityGroup(UForAll.create(ImmutableList.of(tType), tType)) .testEquals(); }
@Test public void serialization() { UType nullType = UPrimitiveType.create(TypeKind.NULL); UType objectType = UClassType.create("java.lang.Object", ImmutableList.<UType>of()); UTypeVar eType = UTypeVar.create("E", nullType, objectType); UType listOfEType = UClassType.create("java.util.List", ImmutableList.<UType>of(eType)); SerializableTester.reserializeAndAssert(UForAll.create(ImmutableList.of(eType), listOfEType)); }