@Test
public void setValue() {

    AbstractFormItem<String> noExpression = formItem(false);
    boolean modified = noExpression.isModified();
    boolean undefined = noExpression.isUndefined();
    noExpression.setValue("foo");
    assertEquals("foo", noExpression.getValue());
    assertNull(noExpression.getExpressionValue());
    assertEquals(modified, noExpression.isModified());
    assertEquals(undefined, noExpression.isUndefined());
    verify(readOnlyAppearance).showValue("foo");
    verify(editingAppearance).showValue("foo");
    reset(readOnlyAppearance, editingAppearance);
    AbstractFormItem<String> expression = formItem(true);
    modified = expression.isModified();
    undefined = expression.isUndefined();
    expression.setValue("foo");
    assertEquals("foo", expression.getValue());
    assertNull(expression.getExpressionValue());
    assertEquals(modified, expression.isModified());
    assertEquals(undefined, expression.isUndefined());
    verify(readOnlyAppearance).showValue("foo");
    verify(editingAppearance).showValue("foo");
    verify(readOnlyAppearance).unapply(EXPRESSION);
    verify(editingAppearance).unapply(EXPRESSION);
}