add a junit test class for the threshold rule code