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

Spring JIRA | Costin Leau | 10 years ago
  1. 0

    Cant mock static functions with powermock-easymock-testng (non-maven project)

    Stack Overflow | 6 years ago | Mock it
    java.lang.IllegalStateException: no last call on a mock available
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    cannot set test expectations in @Before method with Powermock Rule and Spring Runner

    GitHub | 2 years ago | GoogleCodeExporter
    java.lang.IllegalStateException: no last call on a mock available
  4. 0

    Suppressing a void static method and a static method in same class with PowerMock

    dolinked.com | 1 year ago
    java.lang.IllegalStateException: no last call on a mock available

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    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