title: org.powermock.api.mockito.ClassNotPreparedException in Static class mocking
body: <p>I am writing a unit test to mock a static method in the verticle but getting ClassNotPreparedException always. I think that its only possible to mock this way if only the class is static, but i have non static class. What am i missing?</p>
  
  <p>I have tried various solutions like using @rule or @PowerMockIgnore</p>
  
  <pre><code>//myVerticleTest.java
  
  package com.blabla.me.verticles;
  import static com.google.common.truth.Truth.assertThat;
  import org.junit.jupiter.api.BeforeEach;
  import org.junit.jupiter.api.Test;
  import io.vertx.core.Vertx;
  import io.vertx.junit5.VertxTestContext;
  import io.vulpx.VulpxTestBase;
  import org.powermock.api.mockito.PowerMockito;
  import org.powermock.core.classloader.annotations.PowerMockIgnore;
  import org.powermock.core.classloader.annotations.PrepareForTest;
  import org.powermock.modules.junit4.PowerMockRunner;
  import org.junit.runner.RunWith;
  import com.blabla.me.verticles.AdditionalInformationCardVerticle;
  import org.powermock.modules.junit4.rule.PowerMockRule;
  import org.junit.Rule;
  import com.blabla.me.verticles.st;
  
  @RunWith(PowerMockRunner.class)
  @PrepareForTest({ st.class })
  @PowerMockIgnore({"org.mockito.*"})
  public class myVerticleTest extends VulpxTestBase {
  @Rule public PowerMockRule rule = new PowerMockRule();
  private Vertx vertx;
  private AdditionalInformationCardVerticle dummy;
  
      @BeforeEach
      @PrepareForTest({ st.class })
      public void setUp(VertxTestContext testContext) throws Exception {
          vertx = Vertx.vertx();
          try {
              PowerMockito.mockStatic(st.class);
              PowerMockito.when(st.createClient()).thenReturn("kk");
           //deploying verticle
              dummy = new AdditionalInformationCardVerticle();
              vertx.deployVerticle(dummy, testContext.completing());
          } catch (Exception e) {
              System.out.println("heyyy eroorrr : " + e);
          }
      }
      @Test
      @PrepareForTest({ st.class })
      public void justnormaltest() {
          cla ownclass = new cla();
          String k = ownclass.createfromclass();
          assertThat("kk").isEqualTo(k);
      }
  }
  </code></pre>
  
  <pre><code>// st.java 
  public class st {
      public static String createClient() {
          return "kk";
      }
  }
  </code></pre>
  
  <pre><code>// cla.java
  public class cla {
      public String createfromclass() {
          return st.createClient();
      }
  }
  </code></pre>
  
  <p>I expect it to run the assertion but i always get below excpetion:
  "org.powermock.api.mockito.ClassNotPreparedException: 
  The class com.sap.me.verticles.st not prepared for test.
  To prepare this class, add class to the '@PrepareForTest' annotation.
  In case if you don't use this annotation, add the annotation on class or  method level. "</p>