It is necessary to emulate input from the console, but not one value, but several. For one value, the following practice was applied:
System.setIn(new ByteArrayInputStream("...".getBytes())); System.setIn(System.in); How to do for multiple values if possible?