Add JUnit test for Threshold class
Add Codility exercise