@Test
public void modifyValue() {

    AbstractFormItem<String> noExpression = formItem(false);
    noExpression.setModified(false);
    noExpression.setUndefined(true);
    noExpression.modifyValue("foo");
    assertEquals("foo", noExpression.getValue());
    assertNull(noExpression.getExpressionValue());
    assertTrue(noExpression.isModified());
    assertFalse(noExpression.isUndefined());
    verify(readOnlyAppearance, never()).showValue("foo");
    verify(editingAppearance, never()).showValue("foo");
    reset(readOnlyAppearance, editingAppearance);
    AbstractFormItem<String> expression = formItem(true);
    expression.setModified(false);
    expression.setUndefined(true);
    expression.modifyValue("foo");
    assertEquals("foo", expression.getValue());
    assertNull(expression.getExpressionValue());
    assertTrue(expression.isModified());
    assertFalse(expression.isUndefined());
    verify(readOnlyAppearance, never()).showValue("foo");
    verify(editingAppearance, never()).showValue("foo");
    verify(readOnlyAppearance, never()).unapply(EXPRESSION);
    verify(editingAppearance, never()).unapply(EXPRESSION);
}