GrpcDocServicePlugin implements DocServicePlugin { @VisibleForTesting EnumInfo newEnumInfo(EnumDescriptor enumDescriptor) { return new EnumInfo( enumDescriptor.getFullName(), enumDescriptor.getValues().stream() .map(d -> new EnumValueInfo(d.getName(), d.getNumber())) .collect(toImmutableList())); }  @Override String name(); @Override Set<Class<? extends Service<?, ?>>> supportedServiceTypes(); @Override ServiceSpecification generateSpecification(Set<ServiceConfig> serviceConfigs,
                                                      DocServiceFilter filter); @Override Map<String, String> loadDocStrings(Set<ServiceConfig> serviceConfigs); @Override Set<Class<?>> supportedExampleRequestTypes(); @Override String serializeExampleRequest(String serviceName, String methodName,
                                          Object exampleRequest);  }
@Test void newEnumInfo() throws Exception { final EnumInfo enumInfo = generator.newEnumInfo(CompressionType.getDescriptor()); assertThat(enumInfo).isEqualTo(new EnumInfo( "armeria.grpc.testing.CompressionType", ImmutableList.of(new EnumValueInfo("NONE", 0), new EnumValueInfo("GZIP", 1), new EnumValueInfo("DEFLATE", 3)))); }