@Test
public void testInterrupted() throws Exception {

  when(mockResourceLimiter.registerOperationWithHeapSize(anyLong()))
      .thenThrow(new InterruptedException("Fake interrupted error"));
  final ThrottlingClientInterceptor underTest =
      new ThrottlingClientInterceptor(mockResourceLimiter);
  ClientCall call = underTest.interceptCall(methodDescriptor, CallOptions.DEFAULT, mockChannel);
  call.start(mockListener, new Metadata());
  call.sendMessage(request);
  call.halfClose();
  call.request(1);
  ArgumentCaptor<Status> statusCaptor = ArgumentCaptor.forClass(Status.class);
  verify(mockListener, times(1)).onClose(statusCaptor.capture(), any(Metadata.class));
  Assert.assertEquals(statusCaptor.getValue().getCode(), Code.INTERNAL);
}