MuleDescriptor d = getTestDescriptor("anOrange", Orange.class.getName());
MuleDescriptor d = getTestDescriptor("anApple", Apple.class.getName());
    public void testConnectorListenerSupport() throws Exception    {        assertNotNull(connector);        MuleDescriptor d = getTestDescriptor("anOrange", Orange.class.getName());        UMOComponent component = MuleManager.getInstance().getModel().registerComponent(d);        UMOEndpoint endpoint = new MuleEndpoint("test",                                                new MuleEndpointURI(getTestEndpointURI()),                                                connector,                                                null,                                                UMOEndpoint.ENDPOINT_TYPE_SENDER,                                                0,                                                new HashMap());        try {            connector.registerListener(null, null);            fail("cannot register null");        } catch (Exception e) { /* expected */        }        try {            connector.registerListener(null, endpoint);            fail("cannot register null");        } catch (Exception e) { /* expected */        }        try {            connector.registerListener(component, null);            fail("cannot register null");        } catch (Exception e) { /* expected */        }        connector.registerListener(component, endpoint);        // this should work        connector.unregisterListener(component, endpoint);        // so should this        try {            connector.unregisterListener(null, null);            fail("cannot unregister null");        } catch (Exception e) {            // expected        }        try {            connector.unregisterListener(component, null);            fail("cannot unregister null");        } catch (Exception e) {            // expected        }        try {            connector.unregisterListener(null, endpoint);            fail("cannot unregister null");        } catch (Exception e) {            // expected        }        connector.unregisterListener(component, endpoint);        MuleManager.getInstance().getModel().unregisterComponent(d);    }