Added method for installing handlers based on the current test.