Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- public int aaa() { return 1; }
- }
- class B {
- A classA;
- B(A classA) { this.classA = classA; }
- public int getAAA() { return classA.aaa(); }
- }
- A spyA = mock(A.class);
- when(spyA.aaa()).thenReturn(10);
- A AA = new A();
- int res = new B(AA).getAAA();
- Logxx.d("RESULT: " + res);
Add Comment
Please, Sign In to add comment