Hello, I teach java, there is a task to test using the Mockito.spy void method that calls other methods. It does not work out correctly. Please tell me how to do it by example)
public void menu() { do { menuPrint(); switch (choice) { case "1": choise1(); break; case "2": print(mesege2); break; } } while (!exit); private void choise1() { print(mesage); methodCall()
void menu()takes the value ofchoicefrom "space" it must be an input parameter. Methods should depend only on the input parameters. Looking at the code, we can say thatmenuPrint();do nothing, just likechoise1();- keekkenen 6:56 pm