title: test objects created inside a method jmockit
body: <p>The method which I wanted to test looks like:</p>
  <pre><code>public void method1(String str) {
       ParmaObjectRequest request = new ParmaObjectRequest(str);
       this.instanceVar.save(request);
  }
  </code></pre>
  <p>I wanted to test if <code>this.instanceVar.save</code> is called with an ParmaObjectRequest object with str value using jmockit.
  The test case I have written looks like below and I am able to test that my method is called 1 times but not the parameter inside it.</p>
  <pre><code>    @Test
      public void testMethod1() {
          new Expectations() {
              {
                  this.instanceVar.save((ParmaObjectRequest) any);
                  times = 1;
              }
          };
          testObject.method1(&quot;dummyString&quot;);
      }
  </code></pre>
  <p>But I also wanted to test that <code>this.instanceVar.save</code> is called with object containing <code>&quot;dummyString&quot;</code>.</p>