It's a bit hard to advise on this code, as it takes a parameter which is ignored.
The other things that makes the display method just about impossible to unit test is that it lives solely by its side effects (the output to System.out). If it returned a String[] or List<String> (which would then by sent to System.out by the calling method), one could write a unit test that calls it with a parameter of 0 or 1 and checks the return values.