public void testProducerShutdownTestingWithMock() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedBodiesReceived("Hello World");
// create our mock and record expected behavior = that worker timeout should be set to 0
SocketConnector mockConnector = createMock(SocketConnector.class);
mockConnector.dispose(true);
replay(mockConnector);
// normal camel code to get a producer
Endpoint endpoint = context.getEndpoint(String.format("mina2:tcp://localhost:%1$s?textline=true&sync=false", getPort()));
Exchange exchange = endpoint.createExchange();