I am trying to create a JUnit test for my method. I have a method
public a(int a, int b){
a.setA(12);
Injec inj = new Injec();
inj.check();
return (a*b);
}
I want to skip this section because it use HTTP request
Injec inj = new Injec();
inj.check();
I am using
when(Matchers.<Injec> anyObject().check()).thenReturn(null);
But it's giving me exception