@Test
public void getRestDocument() throws Exception {

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