title: how to partial mock public method using PowerMock?
body: <p>Following is my class</p>
  
  <pre><code>public class SomeClass {
      public ReturnType1 testThisMethod(Type1 param1, Type2 param2) {
          //some code
          helperMethodPublic(param1,param2);
          //more code follows  
      }   
  
      public ReturnType2 helperMethodPublic(Type1 param1, Type2 param2) {
          //some code            
      }
  } 
  </code></pre>
  
  <p>So in the above class while testing testThisMethod(), I want to partially mock helperMethodPublic().</p>
  
  <p>As of now, I am doing the following: </p>
  
  <pre><code>SomeClass someClassMock = 
      PowerMock.createPartialMock(SomeClass.class,"helperMethodPublic");
  PowerMock.expectPrivate(someClassMock, "helperMethodPublic, param1, param2).
      andReturn(returnObject);
  </code></pre>
  
  <p>The compiler doesn't complain. So I try to run my test and when the code hits the helperMethodPublic() method, the control goes into the method and starts to execute each line of code in there. How do I prevent this from happening?</p>