@Test
public void getRpcDocument_notFound() throws Exception {

  CachingDiscoveryProvider provider = createNonExpiringProvider();
  when(delegate.getRpcDocument(ROOT, NAME, VERSION)).thenThrow(new NotFoundException(""));
  try {
    provider.getRpcDocument(ROOT, NAME, VERSION);
    fail("expected NotFoundException");
  } catch (NotFoundException e) {
    // expected
  }
}