title: Verify static method calls with Mockito when more than one static method is invoked
body: <p>I am trying to verify that a static method is called during the test. However, it throws an exception due to the fact that more than one static method of the same class is called during the run. Both these static methods are mocked. The exact exception is like this :-</p>
  <blockquote>
  <p>An unexpected error occurred while verifying a static stub.</p>
  <p>To correctly verify a stub, invoke a single static method of
  com.booking.capacityservicejobs.models.YourStaticClass in the provided
  lambda.</p>
  <p>For example, if a method 'sample' was defined, provide a lambda or
  anonymous class containing the code.</p>
  </blockquote>
  <p>The code is something like this:-</p>
  <pre><code>try (MockedStatic&lt;MyClass1&gt; theMock = Mockito.mockStatic(MyClass1.class);
      MockedStatic&lt;MyClass2&gt; configMock = Mockito.mockStatic(MyClass2.class);
      MockedStatic&lt;MyClass3&gt; downtimeMock = Mockito.mockStatic(MyClass3.class)) {
          theMock.when(MyClass1::lockAndFetch).thenReturn(duRuns);
          theMock.when(() -&gt; MyClass1.startAndUnlock(1)).thenAnswer(invocation -&gt; null);
          configMock.when(() -&gt; MyClass2.getById(1)).thenReturn(dummyConfig);
          downtimeMock.when(() -&gt; MyClass3.isScheduledForRole(&quot;app-dummy&quot;)).thenReturn(false);
          new RunExecutor().run(); //this executes the code to be tested
  
          theMock.verify(() -&gt; MyClass1.startAndUnlock(1));
      }
  </code></pre>
  <p>Can I get around this limitation without using powermock? What is the correct way to verify multiple(different) static method calls?</p>