/**
   * Test method for {@link
   * org.eclipse.wst.sse.sieditor.ui.v2.wsdl.controller.SIFormPageController#editItemNameTriggered(org.eclipse.wst.sse.sieditor.ui.v2.nodes.ITreeNode,
   * java.lang.String)} .
   *
   * @throws CoreException
   * @throws IOException
   */
  @Test
  public final void testEditItemNameTriggered() throws IOException, CoreException {
    IWsdlModelRoot wsdlRoot =
        getWSDLModelRoot(
            org.eclipse.wst.sse.sieditor.test.model.Constants.DATA_PUBLIC_SELF_KESHAV
                + "Documentation.wsdl",
            "Documentation.wsdl"); //$NON-NLS-1$ //$NON-NLS-2$
    TestSIFormPageController sifpc = new TestSIFormPageController(wsdlRoot, false);
    sifpc.isEditAllowed = Boolean.valueOf(false);

    StatusUtils.isUnderJunitExecution = true;
    long statusCalls = StatusUtils.getShowStatusDialog_calls();

    IServiceInterface serviceInterface =
        wsdlRoot.getDescription().getAllInterfaces().iterator().next();
    ServiceInterfaceNode siNode = new ServiceInterfaceNode(null, serviceInterface, sifpc);

    String oldName = siNode.getDisplayName();
    String newName = "NewServiceInterfaceName"; // $NON-NLS-1$

    sifpc.editItemNameTriggered(siNode, newName);

    assertEquals(oldName, siNode.getDisplayName());
    assertEquals(1, StatusUtils.getShowStatusDialog_calls() - statusCalls);

    sifpc.isEditAllowed = Boolean.valueOf(true);
    statusCalls = StatusUtils.getShowStatusDialog_calls();

    sifpc.editItemNameTriggered(siNode, newName);

    assertEquals(newName, siNode.getDisplayName());
    assertEquals(0, StatusUtils.getShowStatusDialog_calls() - statusCalls);
  }