Add integration tests for threshold comparison.