Код: Выделить всё
m1). Внутри того же класса Myclass1Код: Выделить всё
m2Код: Выделить всё
class Myclass1 {
public static String m1() {
// do stuff
return m2();
}
public static String m2() {
// do stuff
return "a string";
}
}
Код: Выделить всё
class Myclass1Test {
@Test
void testM1() {
try (MockedStatic
Подробнее здесь: [url]https://stackoverflow.com/questions/79799257/mockito-spying-on-a-class-which-contains-a-static-method-which-calls-another-sta[/url]
Мобильная версия