Problem with connection with Appium using UIAutomator2

Hi,
I have the following problem:

I need to execute test checking the app behaviour while there is no Internet connection.
I got the answer that I should reset the driver. Does someone have any idea how to do it in Java during test executing?