I want to mock a static method using PowerMockito, 

```
public class DepedencyService {

    public static int getImportantValue() {
        return -4;
    }
}

public class Component {

    public int componentMethod() {
        return DepedencyService.getImportantValue();
    }
}

```

but it is giving me an exception.

```
import static org.testng.Assert.assertEquals;
import org.easymock.EasyMock;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;

@RunWith(PowerMockRunner.class)
@PrepareForTest(DepedencyService.class)
public class ComponentTest {
    @Test
    public void testComponentMethod() {
        Component c = new Component();
        PowerMockito.mockStatic(DepedencyService.class);
        EasyMock.expect(DepedencyService.getImportantValue()).andReturn(1);
        assertEquals(1, c.componentMethod());
    }
}

```

The exception :-

> 
> java.lang.IllegalStateException: no last call on a mock available at
>  org.easymock.EasyMock.getControlForLastCall(EasyMock.java:520) at
>  org.easymock.EasyMock.expect(EasyMock.java:498)
> 
> 
> 

Can anyone please help me? Why is this failing? I am new to PowerMockito and does not know what to do here!