void methods can be stubbed using the doThrow(), doAnswer(), doNothing(), doCallRealMethod() family of methods.
Runnable mock = mock(Runnable.class);
doThrow(new UnsupportedOperationException()).when(mock).run();
mock.run(); // throws the UnsupportedOperationException
Note thatvoid methods...