There are several problems with the code...
... including the fact that you're not initializing testNumber
... which will cause all values you insert to compare as "=="
... which won't work with a "Set" (where all values must be unique...)
But the real problem is shown in this traceback (which you probably should have cut/pasted along with the code):
Exception in thread "main" java.lang.ClassCastException: test cannot be cast to
at java.util.TreeMap.put(Unknown Source)
at java.util.TreeSet.add(Unknown Source)
The solution is here: