title: Easymock incompatible return value type error
body: <p>I'm trying to create a EasyMock for this particular piece of code, such that innerfValue is of type IJavaValue, which is a subclass of IJavaObject. I've tried conventional methods of dealing with this by mocking innerfValue and then just assuming aJavaValue points to innerfValue and mocking the sendmessage method as if it were a method of innerfValue, but its hasen't been working and by the time I get to the end it gives me a incompatible return value type when I do (symbolvalue in this case is a mock object that I made to return after the sendmessage method was called on my mock innerfValue object, not the saem as the symbolValue in the other piece of code):</p>
  
  <pre><code>EasyMock.expect(((IJavaObject)symbolValue).toString()).andReturn("aValue");
  </code></pre>
  
  <p>Here is the piece of code</p>
  
  <pre><code>IJavaObject aJavaValue = (IJavaObject)innerfValue.getValue();
  IJavaObject symbolValue = (IJavaObject) ((IJavaObject)aJavaValue).sendMessage(
      "toString", "()Ljava/lang/String;", null, thread, false);
  value = symbolValue.toString();
  </code></pre>