MuleManager.getConfiguration().setSynchronous(true);
MuleManager.getConfiguration().setDefaultSynchronousEndpoints(true);
    public void testReceivingASubscriptionEvent() throws Exception    {        OrderManagerBean subscriptionBean = (OrderManagerBean)context.getBean("orderManager");        assertNotNull(subscriptionBean);        // when an event is received by 'testEventBean1' this callback will be        // invoked        EventCallback callback = new EventCallback()        {            public void eventReceived(UMOEventContext context, Object o) throws Exception            {                eventCount.incrementAndGet();            }        };        subscriptionBean.setEventCallback(callback);        MuleManager.getConfiguration().setSynchronous(true);        MuleClient client = new MuleClient();        Order order = new Order("Sausage and Mash");        client.send("jms://orders.queue", order, null);        Thread.sleep(1000);        assertTrue(eventCount.get() == 1);        UMOMessage result = client.receive("jms://processed.queue", 10000);        assertEquals(1, eventCount.get());        assertNotNull(result);        assertEquals("Order 'Sausage and Mash' Processed", result.getPayload());    }