title: Getting PowerMock Error: java.lang.AbstractMethodError: org.powermock.api.mockito.internal.mockmaker.PowerMockMaker
body: <p>I am getting PowerMock error but I am not using PowerMocking. I am using normal mocking. This is my class which I want to test:</p>
  <pre class="lang-java prettyprint-override"><code>import java.util.List;
  
  import org.apache.commons.lang.StringUtils;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Component;
  
  @Component
  public class IlinqBeanDataBuilder {
  
      @Autowired
      private Settings settings;
  
      private static final String SERVICE_CODE_FOR_FACILITY_COUNTRY = &quot;SERVICE_CODE_FOR_FACILITY_COUNTRY&quot;;
      private static final String SERVICE_CODE_A_CONSTANT = &quot;A&quot;;
  
      private static final String HARD_DOWN = &quot;HARD DOWN&quot;;
      private static final String QUICK_QUESTION = &quot;QUICK QUESTION&quot;;
      private static final String PARTIAL_DOWN = &quot;PARTIAL DOWN&quot;;
  
      private static final String COMPLETELY_DOWN = &quot;Completely Down&quot;;
      private static final String UP = &quot;Up&quot;;
      private static final String PARTIALLY_DOWN = &quot;Partially Down&quot;;
  
      public RfsData prepareIlinqData(RequestData requestdata) throws FileNotFoundException {
  
          System.out.println(&quot;M into prepare illinq data&quot;);
          RfsData iLinkDataBean = new RfsData();
          iLinkDataBean.setCountryCode(requestdata.getCountryCode());
          iLinkDataBean.setSystemId(requestdata.getEquipmentID());
          iLinkDataBean.setModality(requestdata.getModality());
          /**
           * Removing the US from FacilityID In future fix need to change based on
           * some related information
           */
          iLinkDataBean.setCustomerId(requestdata.getFacilityID().substring(3));
  
          iLinkDataBean.setFirstname(requestdata.getName());
          iLinkDataBean.setPnumber(requestdata.getPhoneNumber());
          iLinkDataBean.setExtension(requestdata.getExtension());
          iLinkDataBean.setDescription(requestdata.getDescription());
          iLinkDataBean.setShortDescription(requestdata.getShortDescription());
          iLinkDataBean.setPeriod(requestdata.getTimePeriod());
          iLinkDataBean.setIlinq_local(requestdata.getLocale());
          iLinkDataBean.setRequestApp(requestdata.getRequestingApp());
          iLinkDataBean.setExamNum(requestdata.getExamNumber());
          iLinkDataBean.setSeriesNum(requestdata.getSeriesNumber());
          iLinkDataBean.setImageNum(requestdata.getImageNumber());
          iLinkDataBean.setRequestorSystemId(requestdata.getEquipmentID());
          iLinkDataBean.setServicecode(requestdata.getServiceCode());
          iLinkDataBean.setIsocode(requestdata.getIsoCode());
          iLinkDataBean.setProblemtype(requestdata.getProblemType());
          if (StringUtils.isNotBlank(requestdata.getEquipmentStatus())
                  || StringUtils.isNotEmpty(requestdata.getEquipmentStatus())) {
              if (requestdata.getEquipmentStatus().trim().equalsIgnoreCase(HARD_DOWN)) {
                  iLinkDataBean.setStatus(COMPLETELY_DOWN);
              } else if (requestdata.getEquipmentStatus().trim().equalsIgnoreCase(QUICK_QUESTION)) {
                  iLinkDataBean.setStatus(UP);
              } else if (requestdata.getEquipmentStatus().trim().equalsIgnoreCase(PARTIAL_DOWN)) {
                  iLinkDataBean.setStatus(PARTIALLY_DOWN);
              } else {
                  iLinkDataBean.setStatus(requestdata.getEquipmentStatus());
              }
          }
  
          String CountryCode = iLinkDataBean.getCountryCode();
          System.out.println(&quot;Hi country code is:&quot; + CountryCode);
  
          String list1 = this.settings.getString(&quot;contactge.americas.country.codes&quot;);
          System.out.println(&quot;list 1 data is:&quot; + list1);
  
          String list2 = this.settings.getString(&quot;contactge.asia.country.codes&quot;);
          String list3 = this.settings.getString(&quot;contactge.europe.country.codes&quot;);
          String list4 = this.settings.getString(&quot;contactge.japan.country.codes&quot;);
          List&lt;String&gt; RegionList1 = Arrays.asList((list1.split(&quot;,&quot;)));
          List&lt;String&gt; RegionList2 = Arrays.asList((list2.split(&quot;,&quot;)));
          List&lt;String&gt; RegionList3 = Arrays.asList((list3.split(&quot;,&quot;)));
          List&lt;String&gt; RegionList4 = Arrays.asList((list4.split(&quot;,&quot;)));
  
          System.out.println(&quot;List1 data is:&quot; + RegionList1);
          System.out.println(&quot;List2 data is:&quot; + RegionList2);
          System.out.println(&quot;List3 data is:&quot; + RegionList3);
          System.out.println(&quot;List4 data is:&quot; + RegionList4);
          String RegionCode = null;
          if (RegionList1.contains(CountryCode)) {
              System.out.println(&quot;M in list 1&quot;);
  
              RegionCode = &quot;Americas&quot;;
  
          } else if (RegionList2.contains(CountryCode)) {
              System.out.println(&quot;M in list 2&quot;);
              RegionCode = &quot;ROA&quot;;
          } else if (RegionList3.contains(CountryCode)) {
              System.out.println(&quot;M in list 3&quot;);
              RegionCode = &quot;EMEA&quot;;
          } else if (RegionList4.contains(CountryCode)) {
              System.out.println(&quot;M in list 4&quot;);
              RegionCode = &quot;Japan&quot;;
          }
  
          System.out.println(&quot;Region code:&quot; + RegionCode);
          iLinkDataBean.setRegionCode(RegionCode);
          System.out.println(&quot;ilinq data bean builder data:&quot; + iLinkDataBean);
  
          // Getting regionCode from CountryCode using property file
          // iLinkDataBean.setRegionCode(RegionCode);
          System.out.println(&quot;system id----------------:&quot; + iLinkDataBean.getSystemId());
  
          System.out.println(&quot;ilinq data bean builder data:&quot; + iLinkDataBean);
          return iLinkDataBean;
      }
  }
  </code></pre>
  <p>This is my test class. In this, I am mocking setting object which fetch data from database and I am doing inject mock at ILinqBeanDataBuilder.</p>
  <pre class="lang-java prettyprint-override"><code>import org.junit.Before;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.mockito.InjectMocks;
  import org.mockito.Mock;
  import org.mockito.Mockito;
  import org.mockito.MockitoAnnotations;
  import org.mockito.runners.MockitoJUnitRunner;
  
  import junit.framework.Assert;
  
  @RunWith(MockitoJUnitRunner.class)
  public class IlinqBeanDataBuilderTest {
  
      @InjectMocks
      IlinqBeanDataBuilder iLinqdata;
  
      @Mock
      private Settings settings;
  
      @Before
      public void setUp() throws Throwable {
  
          MockitoAnnotations.initMocks(this);
  
          // iLinqdata = new IlinqBeanDataBuilder();
  
      }
  
      @Test
      public void testCheckSum() throws FileNotFoundException {
  
          RequestData reqData = new RequestData();
          reqData.setCountryCode(&quot;123&quot;);
          reqData.setEquipmentID(&quot;414541HD01&quot;);
          reqData.setModality(&quot;sjdksd&quot;);
          reqData.setFacilityID(&quot;sdjhsdj&quot;);
          reqData.setCountryCode(&quot;CA&quot;);
          reqData.setIsoCode(&quot;2&quot;);
          reqData.setProblemType(&quot;ddddddddd&quot;);
          reqData.setProblemArea(&quot;ssbnc&quot;);
          reqData.setEquipmentStatus(&quot;sdsds&quot;);
          reqData.setName(&quot;pinku&quot;);
          reqData.setPhoneNumber(&quot;2999999999992&quot;);
          reqData.setExamNumber(&quot;12323&quot;);
          reqData.setServiceCode(&quot;sdfsfdf&quot;);
          reqData.setExtension(&quot;3473437&quot;);
          reqData.setDescription(&quot;sdsjd&quot;);
          reqData.setShortDescription(&quot;sjdks&quot;);
          reqData.setTimePeriod(&quot;01/01/2011,13:00&quot;);
          reqData.setLocale(&quot;en_US&quot;);
          reqData.setRequestingApp(&quot;icenter&quot;);
          reqData.setImageNumber(&quot;sdjsh&quot;);
          reqData.setSeriesNumber(&quot;2334&quot;);
          Mockito.when(settings.getString(&quot;contactge.americas.country.codes&quot;))
                  .thenReturn(&quot;CA,CL,MX,PR,US,AR,BR,GD,VE,CR,PE,AS,DO,HN,PA,CO,BO,GT,JM,EC,PY,UY,NI,SV&quot;);
          Mockito.when(settings.getString(&quot;contactge.asia.country.codes&quot;))
                  .thenReturn(&quot;IN,CN,AU,HK,KR,MY,SG,TW,TH,ID,PH,NZ,VN,C3,H2,DV&quot;);
  
          Mockito.when(settings.getString(&quot;contactge.europe.country.codes&quot;)).thenReturn(
                  &quot;AT,BE,CH,DE,ES,FI,FR,GB,IT,NL,PT,SE,UK,NO,DK,PL,RO,ZA,IE,SA,EG,HU,TR,GR,CZ,IL,AE,AL,BG,CS,CY,DZ,IS,JO,KE,KW,LB,LU,MT,MC,MA,RE,RU,SI,SK,TN,UM,AZ,BA,BJ,BY,DI,GE,GF,HR,KZ,LT,LV,MK,UA,YU,OT,NG&quot;);
          Mockito.when(settings.getString(&quot;contactge.japan.country.codes&quot;)).thenReturn(&quot;JP&quot;);
  
          RfsData rfs = iLinqdata.prepareIlinqData(reqData);
          System.out.println(rfs.getCountryCode());
  
          Assert.assertEquals(&quot;CA&quot;, rfs.getCountryCode());
      }
  }
  </code></pre>
  <p>I am getting this error:</p>
  <pre><code>            at org.mockito.internal.creation.MockSettingsImpl.validatedSettings(MockSettingsImpl.java:167)
              at org.mockito.internal.creation.MockSettingsImpl.confirm(MockSettingsImpl.java:161)
              at org.mockito.internal.MockitoCore.mock(MockitoCore.java:54)
              at org.mockito.Mockito.mock(Mockito.java:1449)
  </code></pre>