Allow injecting threshold