Check for Hz instances that have not been shut down after test has finished

If there are instances remaining exception is thrown and the test fails.
Remaining instances are shut down.