Code example for PropertyChangeListenerProxy

0
        PropertyChangeListener l3 = new PropertyChangeListenerProxy("myProp",
                l2);
 
        sup.addPropertyChangeListener(null, l1);
        sup.addPropertyChangeListener(null, l3);
        l3 = new PropertyChangeListenerProxy(null, l2);
        sup.addPropertyChangeListener(l3);
    } 
 
    /* 
     * Test the method addPropertyChangeListener(PropertyChangeListener, 
     * String) with a listener parameter that has already been registered for 
     * the named property. 
     */ 
    public void testAddPropertyChangeListener_PropertyChangeListener_String_Duplicate() { 
        Object src = new Object();
        PropertyChangeSupport sup = new PropertyChangeSupport(src);
        PropertyChangeListener l1 = new MockPropertyChangeListener();
        PropertyChangeListener l2 = new MockPropertyChangeListener();
        PropertyChangeListener l3 = new PropertyChangeListenerProxy("myProp",
                l2);