HyperlinkAction extends AbstractHyperlinkAction<URI> { @Override public void actionPerformed(ActionEvent e) { if (!getURIVisitor().isEnabled(getTarget())) return; try { getURIVisitor().visit(getTarget()); setVisited(true); } catch (IOException e1) { setVisited(false); LOG.fine("cant visit Desktop " + e); } } HyperlinkAction();  HyperlinkAction(Action desktopAction);  HyperlinkAction(URI uri, Action desktopAction); static HyperlinkAction createHyperlinkAction(URI uri); static HyperlinkAction createHyperlinkAction(URI uri, Action type); @Override void actionPerformed(ActionEvent e); Action getDesktopAction();  }
@Test public void testURIActionPerformed() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run ui test - headless environment"); return; } HyperlinkAction action = new HyperlinkAction(); action.actionPerformed(null); }