Class MockableBaseTest

    • Constructor Detail

      • MockableBaseTest

        public MockableBaseTest()
    • Method Detail

      • mockStatic

        public static <T> void mockStatic​(Class<T> clz,
                                          Consumer<org.mockito.MockedStatic<T>> test)
        Utility method to enable the mocking of static invocations of the given class within the current thread.
        Parameters:
        clz - The class whose static invocations can be mocked
        test - The testing logic to be executed with the static mock which is the input argument of the Consumer. This way it can be used to stub the mock methods required by the test.