My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 310: MockStaticTest.testMockStatic failing with IllegalStateException: no last call on a mock available
4 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----

Sign in to add a comment
Reported by, Jan 26, 2011
What steps will reproduce the problem?
2. download the files StaticService.class, StaticHelper.class
3.Run the test class MockStaticTest
4. test case fails with
java.lang.IllegalStateException: no last call on a mock available
	at org.easymock.EasyMock.getControlForLastCall(
	at org.easymock.EasyMock.expect(
	at com.westgroup.novus.migratescheduler.MockStaticTest.testMockStatic(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

What version of the product are you using? On what operating system? on windows xp

Please provide any additional information below.
I am trying ot use powermock to mock the static class, i wanted to take help from working example from MockStaticTest. 
Feb 9, 2011
Project Member #1
This is usually a user error. "MockStaticTest" is executed on every PowerMock release so it should work. Please provide a running example if you think there's a problem.

Apr 7, 2011
I think that this issue is related to Issue 309
Sign in to add a comment

Powered by Google Project Hosting