我遇到了抛出InterruptedException的问题。 我的部分资料来源:
Future<Object> future = mock(Future.class);
when(future.get(any(), any())).thenThrow(new InterruptedException());
但是我在第二行得到了java.lang.NullPointerException,我的代码出了什么问题?我想在调用get方法
时抛出InterruptedException