@Test
public void setDeprecated() {

    ModelNode modelNode = new ModelNode();
    modelNode.get(SINCE).set("1.2.3");
    modelNode.get(REASON).set("why not");
    Deprecation deprecation = new Deprecation(modelNode);
    AbstractFormItem<String> formItem = formItem(false);
    assertFalse(formItem.isDeprecated());
    formItem.setDeprecated(deprecation);
    assertTrue(formItem.isDeprecated());
    verify(readOnlyAppearance).apply(DEPRECATED, deprecation);
    verify(editingAppearance).apply(DEPRECATED, deprecation);
    formItem.setDeprecated(null);
    assertFalse(formItem.isDeprecated());
    verify(readOnlyAppearance).unapply(DEPRECATED);
    verify(editingAppearance).unapply(DEPRECATED);
}