@Test
public void testSettingDefaultMessageEncoding() throws Exception {
MockDeploymentPhaseContext context = setupResourceAsTorqueboxYml( "messaging-with-default-encoding.yml" );
MockDeploymentUnit unit = context.getMockDeploymentUnit();
RubyAppMetaData appMetaData = new RubyAppMetaData( "app-name" );
appMetaData.setRoot( new File( "/home/mrplow" ) );
Map<String, String> env = new HashMap<String, String>();
appMetaData.setEnvironmentVariables( env );
appMetaData.attachTo( unit );
deploy( context );
assertEquals( "marshal", env.get( "DEFAULT_MESSAGE_ENCODING" ) );
List<MessageProcessorMetaData> procMetaData = unit.getAttachmentList( MessageProcessorMetaData.ATTACHMENTS_KEY );