return "org/mule/test/integration/client/mule-client-listener-config.xml";
}
public void doTestRegisterListener(String component, String endpoint, boolean canSendWithoutReceiver) throws Exception
{
MuleClient client = new MuleClient(muleContext);
try
{
client.send(endpoint, "Test Client Send message", null);
}
catch (DispatchException e)
{
if (!canSendWithoutReceiver)
{
assertTrue(e instanceof DispatchException);
assertTrue(e.getCause() instanceof NoReceiverForEndpointException);
}
}
Service c = muleContext.getRegistry().lookupService(component);
c.start();
MuleMessage message = client.send(endpoint, "Test Client Send message", null);
assertNotNull(message);
assertEquals("Received: Test Client Send message", message.getPayloadAsString());
// The SpringRegistry is read-only so we can't unregister the service!
//muleContext.getRegistry().unregisterComponent("vmComponent");
c.stop();
try
{
client.send(endpoint, "Test Client Send message", null);
}
catch (DispatchException e)
{
if (!canSendWithoutReceiver)
{