@ UnstableApi public < T > StaticMockitoSessionBuilder spyStatic ( Class < T > clazz ) { staticMockings . add ( new StaticMocking <> ( clazz , ( ) -> Mockito . mock ( clazz , withSettings ( ) . defaultAnswer ( CALLS_REAL_METHODS ) ) ) ) ; return this ; }
Sets up spying for static methods of a class .