java.lang.IllegalStateException: method call on the mock needed before setting Throwable

Spring JIRA | Costin Leau | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.

    Root Cause Analysis

    1. java.lang.IllegalStateException

      method call on the mock needed before setting Throwable

      at org.easymock.MockControl.setThrowable()
    2. EasyMock
      MockControl.expectAndThrow
      1. org.easymock.MockControl.setThrowable(MockControl.java:231)
      2. org.easymock.MockControl.expectAndThrow(MockControl.java:1298)
      2 frames
    3. spring-modules-cache
      EhCacheFacadeTests.testOnRemoveFromCacheWhenCacheAccessThrowsIllegalStateException
      1. org.springmodules.cache.provider.ehcache.EhCacheFacadeTests.testOnRemoveFromCacheWhenCacheAccessThrowsIllegalStateException(EhCacheFacadeTests.java:352)
      1 frame