@Test
public void testArrowDraw() throws InterruptedException {

  CountDownLatch latch = new CountDownLatch(1);
  CountDownLatch closeLatch = new CountDownLatch(1);
  SwingUtilities.invokeLater(() -> {
    JFrame frame = new JFrame("Arrow");
    frame.add(new JPanel() {
      @SuppressFBWarnings("BC_UNCONFIRMED_CAST")
      public void paintComponent(final Graphics g) {
        new Arrow2D(0, 0, 100, 100).draw((Graphics2D) g);
      }
    }, BorderLayout.CENTER);
    frame.setSize(800, 400);
    frame.addWindowListener(new LatchWindowCloseListener(closeLatch));
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.setVisible(true);
    latch.countDown();
  });
  Assert.assertTrue(latch.await(10, TimeUnit.SECONDS));
  if (TestUtils.isExecutedFromIDE()) {
    Assert.assertTrue(closeLatch.await(1, TimeUnit.HOURS));
  }
}