Let\'s suppose I have a program with a main method that uses the java.util.Scanner class to receive user input.
java.util.Scanner
import java.util.Scanner; publ
The System Rules library provides JUnit rules for such tests. Additionally you should use a parameterized test.