MULE-6990: OOM exception using foreach

_ Fixing test