title: Powermock/EasyMock: Set expectation on final method that would throw exception
body: <p>How do I set an expectation on a final method if I can't safely invoke that method at all? PowerMock is supposed to ensure the invocation is mocked, but I can't even get to that stage:</p>
  
  <p>WithFinal.java:</p>
  
  <pre><code>public class WithFinal {
      public final void finalMethod() {
          throw new RuntimeException();
      }
  }
  </code></pre>
  
  <p>CallsFinal.java:</p>
  
  <pre><code>public class CallsFinal {
      private WithFinal withFinal;
  
      public CallsFinal(WithFinal withFinal) {
          this.withFinal = withFinal;
      }
  
      public void callFinal() {
          withFinal.finalMethod();
      }
  }
  </code></pre>
  
  <p>PowerMockTest.java:</p>
  
  <pre><code>import org.easymock.EasyMock;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.powermock.modules.junit4.PowerMockRunner;
  import org.powermock.core.classloader.annotations.PrepareForTest;
  
  import static org.powermock.api.easymock.PowerMock.*;
  
  @RunWith(PowerMockRunner.class)
  @PrepareForTest(CallsFinal.class)
  public class PowerMockTest {
      @Test public void testFinal() {
          WithFinal mock = createMock(WithFinal.class);
          CallsFinal callsFinal = new CallsFinal(mock);
          mock.finalMethod();
          EasyMock.expectLastCall().atLeastOnce();
          replay(mock);
          callsFinal.callFinal();
          verify(mock);
      }
  }
  </code></pre>
  
  <p>I get a <code>RuntimeException</code> on the very first call to <code>mock.finalMethod()</code>, which makes sense, but I thought the whole point of PowerMock was to make this possible?</p>