@Test
public void getRpcDocument() throws Exception {

  CachingDiscoveryProvider provider = createNonExpiringProvider();
  setupNormalMockDelegate();
  // Make the same call twice and ensure that the delegate is only called once.
  assertThat(provider.getRpcDocument(ROOT, NAME, VERSION)).isEqualTo(RPC_DOC);
  assertThat(provider.getRpcDocument(ROOT, NAME, VERSION)).isEqualTo(RPC_DOC);
  verify(delegate, times(1)).getRpcDocument(ROOT, NAME, VERSION);
}