### Question:
UWhileLoop extends USimpleStatement implements WhileLoopTree { public static UWhileLoop create(UExpression condition, UStatement body) { return new AutoValue_UWhileLoop(condition, (USimpleStatement) body); }  static UWhileLoop create(UExpression condition, UStatement body); @Override abstract UExpression getCondition(); @Override abstract USimpleStatement getStatement(); @Override JCWhileLoop inline(Inliner inliner); @Override Choice<Unifier> visitWhileLoop(WhileLoopTree loop, Unifier unifier); @Override R accept(TreeVisitor<R, D> visitor, D data); @Override Kind getKind();  }### Answer:
@Test public void equality() { new EqualsTester() .addEqualityGroup( UWhileLoop.create( UParens.create( UMethodInvocation.create( UMemberSelect.create( UFreeIdent.create("itr"), "hasNext", UMethodType.create(UPrimitiveType.BOOLEAN)))), UBlock.create( UExpressionStatement.create( UMethodInvocation.create( UMemberSelect.create( UFreeIdent.create("itr"), "next", UMethodType.create(UTypeVar.create("E")))))))) .addEqualityGroup( UWhileLoop.create( UParens.create( UMethodInvocation.create( UMemberSelect.create( UFreeIdent.create("elements"), "hasNext", UMethodType.create(UPrimitiveType.BOOLEAN)))), UBlock.create( UExpressionStatement.create( UMethodInvocation.create( UMemberSelect.create( UFreeIdent.create("elements"), "next", UMethodType.create(UTypeVar.create("E")))))))) .testEquals(); }
@Test public void serialization() { SerializableTester.reserializeAndAssert( UWhileLoop.create( UParens.create( UMethodInvocation.create( UMemberSelect.create( UFreeIdent.create("itr"), "hasNext", UMethodType.create(UPrimitiveType.BOOLEAN)))), UBlock.create( UExpressionStatement.create( UMethodInvocation.create( UMemberSelect.create( UFreeIdent.create("itr"), "next", UMethodType.create(UTypeVar.create("E")))))))); }