@Test
public void testWriteDiscovery_directory() throws Exception {

  DiscoveryGenerator.Result result =
      generator.writeDiscovery(
          ImmutableList.of(
              configLoader.loadConfiguration(ServiceContext.create(), ArrayEndpoint.class),
              configLoader.loadConfiguration(ServiceContext.create(), EnumEndpoint.class)),
          new DiscoveryContext());
  assertThat(result.directory()).isEqualTo(readExpectedAsDirectory("directory.json"));
}