public void testELTooltip() throws Exception {
   caTest.setProject(getTestProject());
   caTest.openEditor(PAGE_NAME);
   try {
     for (int i = 0; i < EL_PREFIX.length; i++) {
       doELTooltipTest(EL_PREFIX[i], EL_VALUE[i], EL_TOOLTIP_TEXT[i]);
     }
   } finally {
     caTest.closeEditor();
   }
 }
  @SuppressWarnings("deprecation")
  private void doELTooltipTest(String prefix, String value, String compare) {
    String documentContent = caTest.getDocument().get();
    int start = (documentContent == null ? -1 : documentContent.indexOf(prefix));
    assertFalse("Required node '" + prefix + "' not found in document", (start == -1));
    int offsetToTest = start + prefix.length();

    ITextHover hover = getTextHover(caTest.getViewer(), offsetToTest - 1);
    assertNotNull("Hover not found for value: '" + value + "'", hover);

    String hoverText = null;
    if (hover instanceof ITextHoverExtension2) {
      Object hoverInfo2 =
          ((ITextHoverExtension2) hover)
              .getHoverInfo2(
                  caTest.getViewer(), hover.getHoverRegion(caTest.getViewer(), offsetToTest));
      hoverText = String.valueOf(hoverInfo2);
    } else {
      hoverText =
          ((ITextHover) hover)
              .getHoverInfo(
                  caTest.getViewer(), hover.getHoverRegion(caTest.getViewer(), offsetToTest));
    }
    String hoverTextValue = HTML2TextUtil.html2Text(hoverText);
    String compareValue = HTML2TextUtil.html2Text(compare);
    // System.out.println("Hover Text: [" + hoverTextValue + "]\nExpected Value: [" + compareValue +
    // "]\nEqual: " + compareValue.equalsIgnoreCase(hoverTextValue) + "\n");
    assertTrue(
        "Hover exists but its value is not expected:\nHover Text: ["
            + hoverTextValue
            + "]\nExpected Value: ["
            + compareValue
            + "]",
        compareValue.equalsIgnoreCase(hoverTextValue));
  }