getNumber() is throwing Exception
java.lang.IllegalArgumentException: bound must be positive
In Implementation you are using Integer.MIN_VALUE and Integer.MAX_Value, and when you subtract maximum value to minimum value it always returns -1,
random.nextInt(-1) throws exception