SecurityException, NoSuchMethodException {
String eventSetName = "mockPropertyChange";
String listenerMethodName = eventSetName;
Class<MockSourceClass> sourceClass = MockSourceClass.class;
Class<?> listenerType = MockPropertyChangeListener.class;
EventSetDescriptor esd = null;
esd = new EventSetDescriptor(sourceClass, eventSetName, listenerType,
listenerMethodName);
String listenerName = getUnQualifiedClassName(listenerType);
Method addMethod = sourceClass.getMethod("add" + listenerName,
new Class[] { listenerType });
Method removeMethod = sourceClass.getMethod("remove" + listenerName,
new Class[] { listenerType });
assertEquals(addMethod, esd.getAddListenerMethod());
assertEquals(removeMethod, esd.getRemoveListenerMethod());
assertNull(esd.getGetListenerMethod());
assertEquals(1, esd.getListenerMethods().length);
assertEquals(listenerMethodName, esd.getListenerMethods()[0].getName());
assertEquals(1, esd.getListenerMethodDescriptors().length);
assertEquals(listenerMethodName, esd.getListenerMethodDescriptors()[0]
.getMethod().getName());
assertEquals(listenerType, esd.getListenerType());
assertTrue(esd.isInDefaultEventSet());
assertFalse(esd.isUnicast());
esd = new EventSetDescriptor(AnObject.class, "something",
AnObjectListener.class, "aMethod");
}