// Verify field object gets updated when view is checked/unchecked.
  public void testFieldUpdatesFromView() {
    final BasicFieldCheckboxView view = makeFieldCheckboxView();
    assertFalse(mFieldCheckbox.isChecked());
    assertEquals(mFieldCheckbox.isChecked(), view.isChecked());

    view.performClick();
    assertTrue(mFieldCheckbox.isChecked());

    view.performClick();
    assertFalse(mFieldCheckbox.isChecked());
  }
  // Verify that view gets updated if field changes.
  public void testViewUpdatesFromField() {
    final BasicFieldCheckboxView view = makeFieldCheckboxView();
    assertEquals(mFieldCheckbox.isChecked(), view.isChecked());

    mFieldCheckbox.setChecked(true);
    assertTrue(view.isChecked());

    mFieldCheckbox.setChecked(false);
    assertFalse(view.isChecked());

    mFieldCheckbox.setChecked(false);
    assertFalse(view.isChecked());
  }