private MuleContext muleContext;
/** Test for MULE-3092 */
public void testConfigureProgramatically() throws Exception
{
DefaultMuleConfiguration config = new DefaultMuleConfiguration();
config.setDefaultEncoding("UTF-16");
config.setDefaultSynchronousEndpoints(true);
config.setSystemModelType("direct");
config.setDefaultResponseTimeout(30000);
config.setDefaultTransactionTimeout(60000);
config.setWorkingDirectory(workingDirectory);
config.setClientMode(true);
ThreadSafeAccess.AccessControl.setFailOnMessageScribbling(false);
config.setId("MY_SERVER");
config.setClusterId("MY_CLUSTER");
config.setDomainId("MY_DOMAIN");
config.setCacheMessageAsBytes(false);
config.setCacheMessageOriginalPayload(false);
config.setEnableStreaming(false);
ThreadSafeAccess.AccessControl.setAssertMessageAccess(false);
config.setAutoWrapMessageAwareTransform(false);
MuleContextBuilder contextBuilder = new DefaultMuleContextBuilder();
contextBuilder.setMuleConfiguration(config);
muleContext = new DefaultMuleContextFactory().createMuleContext(contextBuilder);