@Test
public void setRestricted() {

    AbstractFormItem<String> formItem = formItem(false);
    formItem.setRestricted(true);
    verify(readOnlyAppearance).apply(RESTRICTED, null);
    verify(editingAppearance).apply(RESTRICTED, null);
    reset(readOnlyAppearance, editingAppearance);
    formItem.setRestricted(false);
    verify(readOnlyAppearance).unapply(RESTRICTED);
    verify(editingAppearance).unapply(RESTRICTED);
}