menu.setPopupMenuVisible(true);
assertTrue(menu.isPopupMenuVisible());
assertSame(menu, menu.getPopupMenu().getInvoker());
assertEquals(new Point(), menu.getPopupMenu().getLocation());
Point menuLocation = menu.getLocationOnScreen();
menuLocation.translate(0, menu.getHeight());
assertEquals(menuLocation, menu.getPopupMenu().getLocationOnScreen());
menu.setPopupMenuVisible(false);
assertFalse(menu.isPopupMenuVisible());
frame.dispose();
}