öffentliche Klasse A {
public void method (boolean b) {
if (b == true)
Methode 1();
sonst
Methode2 ();
}}
private void method1 () {}
private void method2 () {}
}}
öffentliche Klasse TestA {
@Prüfung
public void testMethod () {
A a = Schein (A. Klasse);
a.method (true);
// wie man testet wie verify (a) .method1 ();
}}
}}
Wie man eine private Methode testet oder nicht, und wie man eine private Methode mit mockito testet ???