Added tests for hysteresis threshold.