@Test
public void testWriteDiscovery_nonDiscoverableEndpoint() throws Exception {

  DiscoveryGenerator.Result result = generator.writeDiscovery(
      ImmutableList.of(
          configLoader.loadConfiguration(ServiceContext.create(), NonDiscoverableEndpoint.class)),
      new DiscoveryContext().setGenerateAll(false));
  assertThat(result.discoveryDocs()).isEmpty();
  assertThat(result.directory().getItems()).isEmpty();
}