String[] listenerMethodNames = { "mockPropertyChange",
"mockPropertyChange2", };
String addMethod = "addMockPropertyChangeListener";
String removeMethod = "removeMockPropertyChangeListener";
String getMethod = "getMockPropertyChangeListener";
EventSetDescriptor esd = new EventSetDescriptor(sourceClass,
eventSetName, listenerType, listenerMethodNames, addMethod,
removeMethod, getMethod);
assertEquals(addMethod, esd.getAddListenerMethod().getName());
assertEquals(removeMethod, esd.getRemoveListenerMethod().getName());
assertNull(esd.getGetListenerMethod());
assertEquals(2, esd.getListenerMethods().length);
assertEquals(listenerMethodNames[0], esd.getListenerMethods()[0]
.getName());
assertEquals(listenerMethodNames[1], esd.getListenerMethods()[1]
.getName());
assertEquals(2, esd.getListenerMethodDescriptors().length);
assertEquals(listenerMethodNames[0],
esd.getListenerMethodDescriptors()[0].getMethod().getName());
assertEquals(listenerMethodNames[1],
esd.getListenerMethodDescriptors()[1].getMethod().getName());
assertEquals(listenerType, esd.getListenerType());
assertTrue(esd.isInDefaultEventSet());
assertFalse(esd.isUnicast());
// Regression for HARMONY-1237
try {
new EventSetDescriptor(Thread.class, "0xABCD", Thread.class,
new String[] {}, "aaa", null, "bbb");
fail("IntrospectionException expected");
} catch (IntrospectionException e) {
// expected
}