title: Mock static variable Mockito
body: <pre><code>// Service
  
  protected static Processor aProcessor = new AProcessor();
  protected static Processor bProcessor = new BProcessor();
  protected static Processor chain;
  
  static {
      validateProcessor.setNextProcessor(bProcessor);
      chain = aProcessor;
  }
  
  public void method() {
      chain.process(new Abc());
  }
  
  // AProcessor
  
  public void process(Abc abc) {
      System.out.println(&quot;AProcessor&quot;);
  }
  
  // Test
  
  
  @Mock
  private Processor aProcessor;
  
  @Test
  public void test() {
  
      service.method();
  
      verify(aProcessor, times(1)).process(any(Abc.class));
  }
  </code></pre>
  <p>I'm trying to mock aProcessor and I want to check that process method called 1 time. But it couldn't mock, it's printing &quot;AProcessor&quot; text. Any suggestion to solve it?</p>