I tried to follow the example offered in the answer to this very similar question, but it does not work for me. I get the following error message:
java.lang.
You need to run this with PowerMockRunner
eg.
@RunWith(PowerMockRunner.class)
@PrepareForTest({ ExampleEnumerable.class})
@Test(groups = {"LoadableBuilderTestGroup"})
public class LoadableBuilderTest {
private ExampleEnumerable mockEnumerable;
@BeforeMethod
public void setUp() {
mockEnumerable = mock(ExampleEnumerable.class);
}
}