title: EasyMock "Unexpected method call" despite of expect method declaration
body: <p>My EasyMock's expected method is perceived as unexpected, although I do not use and strict mocks, and the method is already declared before being replied.</p>
  
  <p>Test fails in this line of code:</p>
  
  <pre><code>Intent batteryIntent = context.getApplicationContext().registerReceiver(null,
          new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
  </code></pre>
  
  <p>Test:</p>
  
  <pre><code>@Before
  public void setUp() {
      mocksControl = createControl();
      contextMock = mocksControl.createMock(Context.class);
      //(...)
  }
  
  @Test
  public void test() {
      expect(contextMock.getApplicationContext()).andReturn(contextMock).anyTimes();
      expect(contextMock.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)))
          .andReturn(someIntent1).once();
      expect(contextMock.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)))
          .andReturn(someIntent2).once();
      mocksControl.replay();
      //(...) tested method is invoked on class under the test
  }
  </code></pre>
  
  <p>Error I get:</p>
  
  <pre><code>java.lang.AssertionError: 
    Unexpected method call Context.registerReceiver(null, android.content.IntentFilter@c009614f):
      Context.registerReceiver(null, android.content.IntentFilter@c009614f): expected: 1, actual: 0
      Context.registerReceiver(null, android.content.IntentFilter@c009614f): expected: 1, actual: 0
  </code></pre>