### Question:
JTabbedPaneFactory implements UIFactory, ChangeListener { public void stateChanged (ChangeEvent e) { try { String action[] = new String[2]; action = (String[]) actions.get(p.getSelectedIndex()); Object al = ui.get (action[1]); if (al instanceof ActionListener) { ActionEvent ae = new ActionEvent(this,0,action[0]); ((ActionListener) al).actionPerformed(ae); } } catch (Exception f) { f.printStackTrace(); } }  JComponent create(UI ui, Element e); void stateChanged(ChangeEvent e);  }### Answer:
@Disabled("test fails because the component is not properly created from the jPOS UI") @Test public void testStateChanged() throws Throwable { JTabbedPaneFactory jTabbedPaneFactory = new JTabbedPaneFactory(); jTabbedPaneFactory.stateChanged(new ChangeEvent(Integer.valueOf(0))); assertEquals(0, jTabbedPaneFactory.actions.size(), "jTabbedPaneFactory.actions.size()"); assertNull(jTabbedPaneFactory.p, "jTabbedPaneFactory.p"); assertNull(jTabbedPaneFactory.ui, "jTabbedPaneFactory.ui"); }