@Test
public void getApiList_internalServerError() throws Exception {

  ProxyingDiscoveryService discoveryService = createDiscoveryService(true);
  when(provider.getDirectory(SERVER_ROOT))
      .thenThrow(new InternalServerErrorException(""));
  try {
    discoveryService.getApiList(createRequest("discovery/v1/apis"));
    fail("expected InternalServerErrorException");
  } catch (InternalServerErrorException e) {
    // expected
  }
}