@Test
public void testParse() {

    int originalSize = mExprModel.size();
    mLayoutBinder.addVariable("user", "android.databinding.tool2.LayoutBinderTest.TestUser",
            null);
    mLayoutBinder.parse("user.name", null, null);
    mLayoutBinder.parse("user.lastName", null, null);
    assertEquals(originalSize + 3, mExprModel.size());
    final List<Expr> bindingExprs = mExprModel.getBindingExpressions();
    assertEquals(2, bindingExprs.size());
    IdentifierExpr id = mExprModel.identifier("user");
    assertTrue(bindingExprs.get(0) instanceof FieldAccessExpr);
    assertTrue(bindingExprs.get(1) instanceof FieldAccessExpr);
    assertEquals(2, id.getParents().size());
    assertTrue(bindingExprs.get(0).getChildren().contains(id));
    assertTrue(bindingExprs.get(1).getChildren().contains(id));
}