@Test
public void getDirectory_internalServerError() throws Exception {

  when(directoryRequest.execute()).thenThrow(new IOException());
  try {
    provider.getDirectory(REWRITTEN_ROOT);
    fail("expected InternalServerErrorException");
  } catch (InternalServerErrorException e) {
    // expected
  }
}