### Question:
UUnionType extends UExpression implements UnionTypeTree { @VisibleForTesting static UUnionType create(UExpression... typeAlternatives) { return create(ImmutableList.copyOf(typeAlternatives)); }  @Override abstract ImmutableList<UExpression> getTypeAlternatives(); @Override Kind getKind(); @Override R accept(TreeVisitor<R, D> visitor, D data); @Override JCTypeUnion inline(Inliner inliner); @Override Choice<Unifier> visitUnionType(UnionTypeTree node, Unifier unifier);  }### Answer:
@Test public void equality() { new EqualsTester() .addEqualityGroup( UUnionType.create( UClassIdent.create("java.lang.IllegalArgumentException"), UClassIdent.create("java.lang.IllegalStateException"))) .addEqualityGroup( UUnionType.create( UClassIdent.create("java.lang.IllegalStateException"), UClassIdent.create("java.lang.IllegalArgumentException"))) .addEqualityGroup( UUnionType.create( UClassIdent.create("java.lang.IllegalStateException"), UClassIdent.create("java.lang.IllegalArgumentException"), UClassIdent.create("java.lang.IndexOutOfBoundsException"))) .testEquals(); }
@Test public void serialization() { SerializableTester.reserializeAndAssert( UUnionType.create( UClassIdent.create("java.lang.IllegalArgumentException"), UClassIdent.create("java.lang.IllegalStateException"))); }