title: How to access attributes including headers, queryparams in Munit set Event processor. I am using Anypoint Studio 7.5
body: <p>How to access attributes including headers, queryparams in Munit set Event processor. I am using Anypoint Studio 7.5
  I have tried with &lt;munit:attributes value=&quot;#[{headers : {'token' :'value1'}}]&quot; encoding=&quot;UTF-16&quot; /&gt; but it didn't worked.</p>
  <pre><code>&lt;sub-flow name=&quot;setUserAndPass&quot;&gt;
      &lt;choice doc:name=&quot;Choice&quot; &gt;
          &lt;when expression='attributes.&quot;headers&quot;.&quot;authorization&quot; != null'&gt;
              &lt;ee:transform doc:name=&quot;Transform Message&quot; &gt;
                  &lt;ee:message &gt;
                  &lt;/ee:message&gt;
                  &lt;ee:variables &gt;
                      &lt;ee:set-variable variableName=&quot;userAndPass&quot; &gt;&lt;![CDATA[%dw 2.0
                              import * from dw::core::Binaries
                              output text/json
                              var auth = attributes.&quot;headers&quot;.&quot;authorization&quot;
                              ---
                              (fromBase64((auth splitBy(&quot; &quot;))[1] as Binary)) splitBy(&quot;:&quot;)]]&gt;&lt;/ee:set-variable&gt;
                  &lt;/ee:variables&gt;
              &lt;/ee:transform&gt;
              &lt;set-variable value='#[vars.userAndPass[0]]' doc:name=&quot;Set lvUSERNAME Variable&quot; variableName=&quot;lvUSERNAME&quot;/&gt;
              &lt;set-variable value='#[vars.userAndPass[1]]' doc:name=&quot;Set lvPASSWORD  variable&quot; variableName=&quot;lvPASSWORD &quot;/&gt;
          &lt;/when&gt;
          &lt;otherwise &gt;
              &lt;set-variable value='#[attributes.&quot;headers&quot;.&quot;username&quot;]' doc:name=&quot;Set lvUSERNAME Variable&quot; variableName=&quot;lvUSERNAME&quot; /&gt;
              &lt;set-variable value='#[attributes.&quot;headers&quot;.&quot;password&quot;]' doc:name=&quot;Set lvPASSWORD Variable&quot; variableName=&quot;lvPASSWORD&quot; /&gt;
          &lt;/otherwise&gt;
      &lt;/choice&gt;
  &lt;/sub-flow&gt;
  </code></pre>
  <p>Munit Flow:</p>
  <pre><code>&lt;munit:test name=&quot;appname-test-suite-setUserAndPassTest&quot; description=&quot;Test&quot;&gt;
      &lt;munit:behavior &gt;
          &lt;munit:set-event doc:name=&quot;Set Event&quot;&gt;
              &lt;munit:attributes value=&quot;#[
      {
          headers : {'authorization': 'authvalue'}
      }]&quot; /&gt;
          &lt;/munit:set-event&gt;
      &lt;/munit:behavior&gt;
      &lt;munit:execution &gt;
          &lt;flow-ref doc:name=&quot;Flow-ref to setUserAndPass&quot; name=&quot;setUserAndPass&quot;/&gt;
      &lt;/munit:execution&gt;
      &lt;munit:validation &gt;
          &lt;munit-tools:assert-equals doc:name=&quot;Assert equals&quot; actual=&quot;#[vars.lvUSERNAME]&quot; expected=&quot;usernamevalue&quot;/&gt;
      &lt;/munit:validation&gt;
  &lt;/munit:test&gt;
  </code></pre>