Teste de entrada do console JUNIT 5
// Instead of using System.in just use a different InputStream!
new ByteArrayInputStream(("your user inpts" + System.lineSeparator() + "enter is simulated by using System.lineSeparator()").getBytes(StandardCharsets.UTF_8)));
Zwazel