MockStatic
- close
MockStatic<TestClass> tc = Mockito.mockStatic(TestClass.class);
tc.close();
- try-catch
try(MockStatic<TestClass> tc = Mockito.mockStatic(TestClass.class)) {
tc.when...
}
MockStatic
MockStatic<TestClass> tc = Mockito.mockStatic(TestClass.class);
tc.close();
try(MockStatic<TestClass> tc = Mockito.mockStatic(TestClass.class)) {
tc.when...
}