title: how to partially mock an external method call using powermock
body: <p>I have 2 classes interacting.
  Say <code>ServiceLayer.class</code> and <code>ApiAdaptor.class</code>:</p>
  
  <pre><code>public class ApiAdaptor {
    public String getCountry(String latitude, String longitude) {
      // REST call to api goes here and a the country string is returned
      return country;
    }
  }
  
  public class ServiceLayer {
   public String findCountry(int positionId) {
     // some business logic here to get latitude and longitude from postitionId 
     ApiAdaptor api = new ApiAdaptor();
     String country = api.getCountry(latitude, longitude);
     return country;
   }
  }
  </code></pre>
  
  <p>Now in the unit test, I want to test only this method <code>ServiceLayer.findcountry()</code>, while mocking the internal call to <code>ApiAdaptor.getCountry(latitude, longitude)</code>. Is there any way I can do this using Powermock. I have seen similar type of stubing while working with Rspec in Ruby On Rails. I want to do similar testing in my java-SpringMVC project as well.</p>