title: Making use of getActivity() in a static method
body: <pre><code>public class QRProductActivityPageObject {
  
  
      public static void testProductDetail() throws InterruptedException {
  
          ActivityTestRule&lt;ProductInfoActivity&gt; rule = new ActivityTestRule&lt;ProductInfoActivity&gt;(ProductInfoActivity.class, true, false);
          Intent intent = new Intent();
          intent.setClass(getActivity(), ProductInfoActivity.class);
          rule.launchActivity(intent);
          Thread.sleep(2000);
       }
  }
  </code></pre>
  
  <p>The above syntax show error that you cant access getActivity() in static method .
  But i want to call this new Activity(ProductInfoActivity) through static method only.Any suggestion??</p>