Not really because with the test I have to do this because every test case run in the same JVM. But in the mule container shutdown will be called, most likely, when the container is shutdown.
I also created an issue to BTM so they can fix this. I will improve this code once I get a fix from them.