< T > void mockStatic ( StaticMocking < T > mocking ) { if ( ExtendedMockito . staticMockMarker ( mocking . clazz ) != null ) { throw new IllegalArgumentException ( mocking . clazz + " is already mocked" ) ; } mockingInProgressClass . set ( mocking . clazz ) ; try { classToMarker . put ( mocking . clazz , mocking . markerSupplier . get ( ) ) ; } finally { mockingInProgressClass . remove ( ) ; } staticMocks . add ( mocking . clazz ) ; }
Init mocking for a class .