docs: private void whenInt(MockedVoidMethod method) {
          if (onMethodCallDuringStubbing.get() != null) {
              throw new IllegalStateException("Stubbing is already in progress on this thread.");
          }
  
          ArrayList<Method> stubbingsSetUp = new ArrayList<>();
  
          /* Set up interception of method. 'method' does not specify what class the stubbing is
           * set up on. Hence wait until the call is made and intercept it just before the code
           * is executed. At this time, start the stubbing operation.
           */
          onMethodCallDuringStubbing.set((clazz, stubbedMethod) -> {
              when(ExtendedMockito.staticMockMarker(clazz));
              stubbingsSetUp.add(stubbedMethod);
          });
          try {
              try {
                  // Call the method. This will be intercepted by onMethodCallDuringStubbing
                  method.run();
              } catch (Throwable t) {
                  throw new RuntimeException(t);
              }
  
              if (stubbingsSetUp.isEmpty()) {
                  // Make sure something was intercepted
                  throw new IllegalArgumentException("Nothing was stubbed. Does the lambda call a"
                          + " static method on a 'static' mock/spy?");
              } else if (stubbingsSetUp.size() > 1) {
                  // A lambda might call several methods. In this case it is not clear what should
                  // be stubbed. Hence throw an error.
                  throw new IllegalArgumentException("Multiple intercepted calls on method "
                          + stubbingsSetUp);
              }
          } finally {
              onMethodCallDuringStubbing.remove();
          }
      }