Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Enclosing {
- public String methodA() {
- getContext();
- ......
- }
- protected void getContext() {
- Inner.getContext();
- ......
- }
- @Test
- public void test_something() {
- Enclosing enclosing = new Enclosing() {
- @Override
- protected void getContext() {
- // do what you need here
- }
- };
- // your test code on enclosing where you control getContext
- }
Add Comment
Please, Sign In to add comment