In IDEA, when encountering a unit test, it cannot receive input from the console.
Table of contents
1. Menu bar Help->Edit Custom VM Options
1. Menu bar Help->Edit Custom VM Options
2. Add the following code
-Deditable.java.test.console=true
3. Restart IDEA
IDEA must be restarted to take effect.