@Test
  public void testJPADetailView() {

    log.step("Open entity");
    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    try {
      pe.getProject(PRJ)
          .getProjectItem("Java Resources", "src/main/java", "org.gen", "Actor.java")
          .open();
    } catch (RedDeerException e) {
      fail("Entities not generated, possible cause https://issues.jboss.org/browse/JBIDE-19175");
    }
    TextEditor textEditor = new TextEditor("Actor.java");
    textEditor.setCursorPosition(20, 1);

    log.step("Open JPA view and check content");
    JPADetailsView jpaDetailsView = new JPADetailsView();
    jpaDetailsView.open();

    try {
      new DefaultStyledText("Type 'Actor' is mapped as entity.");
    } catch (RedDeerException e) {
      fail(
          "JPA details should be available - known issue - https://issues.jboss.org/browse/JBIDE-17940");
    }
  }
 @Test
 public void testToggleComment() throws Throwable {
   // Test open page
   openPage();
   textEditor = new TextEditor(TEST_PAGE);
   originalEditorText = DEFAULT_TEST_PAGE_TEXT;
   textEditor.setText(DEFAULT_TEST_PAGE_TEXT);
   textEditor.save();
   // Test toggle comment from Source menu
   textEditor.setCursorPosition(16, 20);
   new ShellMenu("Source", "Toggle Comment").select();
   textEditor.save();
   new WaitWhile(new JobIsRunning());
   Browser browser = new InternalBrowser();
   assertVisualEditorContainsManyComments(browser, 2, TEST_PAGE);
   final String commentValue = "<h:commandButton action=\"hello\" value=\"Say Hello!\" />";
   assertVisualEditorContainsCommentWithValue(browser, commentValue);
   // Test untoggle comment from Source menu
   new ShellMenu("Source", "Toggle Comment").select();
   textEditor.save();
   new WaitWhile(new JobIsRunning());
   assertVisualEditorContainsManyComments(browser, 1, TEST_PAGE);
   // Test toggle comment with CTRL+SHIFT+C hot keys
   textEditor.activate();
   textEditor.setCursorPosition(16, 20);
   pressToggleCommentHotKeys();
   textEditor.save();
   new WaitWhile(new JobIsRunning());
   assertVisualEditorContainsManyComments(browser, 2, TEST_PAGE);
   assertVisualEditorContainsCommentWithValue(browser, commentValue);
   // Test untoggle comment with CTRL+SHIFT hot keys
   textEditor.setCursorPosition(16, 20);
   pressToggleCommentHotKeys();
   textEditor.save();
   new WaitWhile(new JobIsRunning());
   assertVisualEditorContainsManyComments(browser, 1, TEST_PAGE);
 }