{"action":"opened","issue":{"url":"https://api.github.com/repos/mulesoft/munit/issues/169","labels_url":"https://api.github.com/repos/mulesoft/munit/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/mulesoft/munit/issues/169/comments","events_url":"https://api.github.com/repos/mulesoft/munit/issues/169/events","html_url":"https://github.com/mulesoft/munit/issues/169","id":60450034,"number":169,"title":"MUnit 3.4 Choice Router throwing NullPointerException when initializing subflow","user":{"login":"jcbusta","id":11322477,"avatar_url":"https://avatars.githubusercontent.com/u/11322477?v=3","gravatar_id":"","url":"https://api.github.com/users/jcbusta","html_url":"https://github.com/jcbusta","followers_url":"https://api.github.com/users/jcbusta/followers","following_url":"https://api.github.com/users/jcbusta/following{/other_user}","gists_url":"https://api.github.com/users/jcbusta/gists{/gist_id}","starred_url":"https://api.github.com/users/jcbusta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcbusta/subscriptions","organizations_url":"https://api.github.com/users/jcbusta/orgs","repos_url":"https://api.github.com/users/jcbusta/repos","events_url":"https://api.github.com/users/jcbusta/events{/privacy}","received_events_url":"https://api.github.com/users/jcbusta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-10T04:36:52Z","updated_at":"2015-03-10T04:36:52Z","closed_at":null,"body":"Hi,\r\n\r\nI'm getting a NullPointerException when trying to run a sub-flow test using the Java flavour of MUnit. I've managed to pinpoint it down to the choice router that I have in the sub-flow by making the choice router the only message processor in the subflow. I've also walked through the code somewhat, and I managed to some information from the debugger. Please see all of the relevant information below.\r\n\r\nPlease note that this is MUnit 3.4-M5.\r\n\r\nDebug Info for \"flow\" variable coming from line 238 in FunctionalMUnitSuite.java\r\n\r\n```\r\nSubflowInterceptingChainLifecycleWrapper 'testing1' \r\n[ \r\n  ChoiceRouter [flow-construct=null, started=false]\r\n]\r\n```\r\n\r\nJava Unit Test\r\n\r\n```\r\n\t@Test\r\n\tpublic void testSubFlow() throws Exception{\r\n\r\n\t\trunFlow(\"testing1\",testEvent(muleMessageWithPayload(\"some payload\")));\r\n\t}\r\n```\r\n\r\nFlow File\r\n\r\n```\r\n    <sub-flow name=\"testing1\">\r\n        <choice doc:name=\"Choice\">\r\n        \t<when expression=\"#[payload != null]\">\r\n                <logger message=\"some message..\" level=\"DEBUG\" doc:name=\"Log something\"/>      \t\t\r\n        \t</when>\r\n            <otherwise>\r\n                <logger message=\"another message..\" level=\"DEBUG\" doc:name=\"Log something\"/>\r\n            </otherwise>\r\n        </choice>\r\n    </sub-flow> \r\n```\r\n\r\nStacktrace\r\n\r\n![image](https://cloud.githubusercontent.com/assets/11322477/6569250/24ae27aa-c6bd-11e4-84cf-7c98bcf18af2.png)"}}