assertNull(handler.getListenerMethodName());
}
public void testInvoke_1() throws SecurityException, NoSuchMethodException {
MockTarget target = new MockTarget();
MockButton button = new MockButton();
PropertyChangeListener proxy = EventHandler.create(
PropertyChangeListener.class, target, "setCalled");
String action = "text";
String eventPropertyName = "source.label";
EventHandler handler = new EventHandler(target, action,
eventPropertyName, null);
Method listenerMethod = PropertyChangeListener.class.getMethod(
"propertyChange", new Class[] { PropertyChangeEvent.class });
PropertyChangeEvent event = new PropertyChangeEvent(button, "label",
"1", "5");
handler.invoke(proxy, listenerMethod, new Object[] { event });
assertEquals(button.getLabel(), target.getText());
Method equalsMethod = Object.class.getMethod("equals",
new Class[] { Object.class });
assertEquals(Boolean.FALSE, handler.invoke(proxy, equalsMethod,
new String[] { "mock" }));
// Test null method with non-proxy Object.