BoundAction extends AbstractActionExt { public void addActionListener(ActionListener listener) { addListener(ActionListener.class, listener); } BoundAction();  BoundAction(String name);  BoundAction(String name, String command);  BoundAction(String name, Icon icon);  BoundAction(String name, String command, Icon icon); void setCallback(String callback); void registerCallback(Object handler, String method); void addActionListener(ActionListener listener); void removeActionListener(ActionListener listener); ActionListener[] getActionListeners(); void addItemListener(ItemListener listener); void removeItemListener(ItemListener listener); ItemListener[] getItemListeners(); @Override void actionPerformed(ActionEvent evt); @Override void itemStateChanged(ItemEvent evt);  }
@Test public void testSerializationWithListener() { action.addActionListener(new BoundAction()); BoundAction serialized = serialize(action); assertThat(serialized, is(equivalentTo(action))); }