title: EasyMock.expect() throwing null pointer
body: <p>I am using PowerMock and EasyMock in my project. I am getting null pointer exception while calling the Easymock.expect() method call.</p>
  
  <p>JUnit class:</p>
  
  <pre><code>import static org.easymock.EasyMock.*;
  @RunWith(PowerMockRunner.class)
  @PrepareForTest({InfoDao.class})
  public class AdminUtilTest {
  
  //mocking interface 
  @Mock
  InfoDao infoDaoMock;
  
  @Test
      public void testSetUp() {
          assertNotNull(infoDaoMock);
      }
  @Test
      public void initInfoTest() throws Exception {
  
    // getting null pointer exception in this line..         
           expect(infoDaoMock.getGroupInfoById(isA(Long.class))).andReturn("testString");
  
           replay(infoDaoMock);
          /*rest of the code*/
      }
  }
  </code></pre>
  
  <p>The testSetUp is not null and the <code>assertNotNull</code> is success.</p>
  
  <p>I also tried:</p>
  
  <pre><code>InfoDao infoDaoMock = createMock(InfoDaoMockImpl.class);
  </code></pre>
  
  <p>This is also throwing <code>NullPointerException</code>. What am I doing wrong here?</p>