@Test
public void getRestDocument() throws Exception {

  ProxyingDiscoveryService discoveryService = createDiscoveryService(true);
  when(provider.getRestDocument(SERVER_ROOT, API_NAME, API_VERSION)).thenReturn(REST_DOC);
  RestDescription actual = discoveryService.getRestDocument(
      createRequest("discovery/v1/apis/tictactoe/v1/rest"), API_NAME, API_VERSION);
  assertThat(actual).isEqualTo(REST_DOC);
}