title: Take JSONObject as a parameter in Mockito mock method
body: <p>I am trying to use Mockito to mock a method for my JUnit testing. The Method takes a JSONObject from simple-json as a parameter and responds with a JSONObject. The method I am tring to mock is from another class and the code I am testing calls it. I can not seem to get Mockito to catch my request and respond accordingly. Am I completely missing something here?</p>
  
  <pre><code>public class TestClass{
    JSONObject jsonRequest;
    JSONObject jsonReturn;
  
    AnotherClass anotherClass = Mockito.mock(AnotherClass.class);
  
    @Before
    public void setUp(){
      jsonRequest = this.readJSONFromFile("jsonRequest.json");
      jsonReturn = this.readJSONFromFile("jsonReturn.json");
      Mockito.when(anotherClass.anotherClassMethod(jsonRequest)).thenReturn(jsonReturn);
    }
  
    @Test
    public void testMethod(){
       TestClass testClass = new TestClass();
       assertEquals(testClass.method(jsonRequest), jsonReturn);
    }
  }
  </code></pre>