public void testSetUIMenuBarUI() { MenuBarUI ui1 = new BasicMenuBarUI(); MenuBarUI ui2 = new MetalMenuBarUI(); JMenuBar menuBar = new JMenuBar(); menuBar.setUI(ui1); assertSame(ui1, menuBar.getUI()); menuBar.setUI(ui2); assertSame(ui2, menuBar.getUI()); }