public class DynamicEndpointTest extends SpringTestSupport {
public void testSendingToDynamicEndpoint() throws Exception {
ServiceMixClient client = new DefaultServiceMixClient(jbi);
ServiceEndpoint se = client.resolveEndpointReference("ftp://servicemix:rocks@localhost/smx/test");
assertNotNull("We should find a service endpoint!", se);
InOnly exchange = client.createInOnlyExchange();
exchange.setEndpoint(se);
exchange.getInMessage().setProperty(DefaultFileMarshaler.FILE_NAME_PROPERTY, "test.xml");