title: Why junit test failed when creating mock with EasyMock.createMock?
body: <p>I am experiencing unexpected behavior of EasyMock when writing junit test. Finally, I deleted some lines of code until there is one line of creating mock left to see what happened.</p>
  
  <pre><code>@Test
  public void testSimple() throws Exception {
      Socket socket = EasyMock.createMock(Socket.class);
  }
  </code></pre>
  
  <p>This junit test generates error:</p>
  
  <pre><code>[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.052 sec
  </code></pre>
  
  <p>This is not the case when I just have normal instantiation like:</p>
  
  <pre><code>@Test
  public void testSimple() throws Exception {
      ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
  }
  </code></pre>
  
  <p>This junit test seems happy with that:</p>
  
  <pre><code>[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.047 sec
  </code></pre>
  
  <p>I wonder if someone can clear this ambiguity. Thanks.</p>