### Question:
UMemberSelect extends UExpression implements MemberSelectTree { public static UMemberSelect create(UExpression expression, CharSequence identifier, UType type) { return new AutoValue_UMemberSelect(expression, StringName.of(identifier), type); }  static UMemberSelect create(UExpression expression, CharSequence identifier, UType type); @Override abstract UExpression getExpression(); @Override abstract StringName getIdentifier(); @Override Choice<Unifier> visitMemberSelect(MemberSelectTree fieldAccess, Unifier unifier); @Override Choice<Unifier> visitIdentifier(final IdentifierTree ident, Unifier unifier); @Override Kind getKind(); @Override R accept(TreeVisitor<R, D> visitor, D data); @Override JCExpression inline(Inliner inliner); static final String CONVERT_TO_IDENT; }### Answer:
@Test public void equality() { UType stringTy = UClassType.create("java.lang.String"); UMethodType indexOfIntTy = UMethodType.create(UPrimitiveType.INT, UPrimitiveType.INT); UMethodType indexOfStringTy = UMethodType.create(UPrimitiveType.INT, stringTy); UExpression fooLit = ULiteral.stringLit("foo"); UExpression barLit = ULiteral.stringLit("bar"); new EqualsTester() .addEqualityGroup(UMemberSelect.create(fooLit, "indexOf", indexOfIntTy)) .addEqualityGroup(UMemberSelect.create(fooLit, "indexOf", indexOfStringTy)) .addEqualityGroup(UMemberSelect.create(barLit, "indexOf", indexOfIntTy)) .testEquals(); }
@Test public void serialization() { SerializableTester.reserializeAndAssert( UMemberSelect.create( ULiteral.stringLit("foo"), "indexOf", UMethodType.create(UPrimitiveType.INT, UPrimitiveType.INT))); }