Code example for PropertyChangeListenerProxy

0
    public void testGetPropertyChangeListener_String_None() { 
        Object src = new Object();
        PropertyChangeSupport sup = new PropertyChangeSupport(src);
        PropertyChangeListener l1 = new MockPropertyChangeListener();
        PropertyChangeListener l2 = new MockPropertyChangeListener();
        PropertyChangeListener l3 = new PropertyChangeListenerProxy("myProp2",
                l2);
        PropertyChangeListener l4 = new MockPropertyChangeListener();
 
        sup.addPropertyChangeListener(l1);
        sup.addPropertyChangeListener(l3);
        sup.addPropertyChangeListener("myProp3", l4);
 
        assertEquals(0, sup.getPropertyChangeListeners("myProp").length);
    } 
 
    /* 
     * Test the method getPropertyChangeListeners(String) with a null parameter. 
     */ 
    public void testGetPropertyChangeListener_String_Null() { 
        Object src = new Object();