ServerFactory { public static ServerFactory createEpollSocket() { return new EpollSocket(); }  static ServerFactory createDefault(); static ServerFactory createWithUrlFactory(UrlFactory urlFactory); static ServerFactory createWithPortSupplier(Supplier<Integer> portSupplier); static ServerFactory createWithUrlFactoryAndPortSupplier(
      UrlFactory urlFactory, Supplier<Integer> portSupplier); static ServerFactory createEpollSocket(); static ServerFactory createEpollDomainSocket(); abstract Server allocateAddressAndCreate(
      List<BindableService> services, Endpoints.ApiServiceDescriptor.Builder builder); abstract Server create(
      List<BindableService> services, Endpoints.ApiServiceDescriptor serviceDescriptor);  }
@Test public void testCreatingEpollServer() throws Exception { assumeTrue(Epoll.isAvailable()); assumeTrue(InetAddress.getLoopbackAddress() instanceof Inet4Address); Endpoints.ApiServiceDescriptor apiServiceDescriptor = runTestUsing(ServerFactory.createEpollSocket(), ManagedChannelFactory.createEpoll()); HostAndPort hostAndPort = HostAndPort.fromString(apiServiceDescriptor.getUrl()); assertThat( hostAndPort.getHost(), anyOf( equalTo(InetAddress.getLoopbackAddress().getHostName()), equalTo(InetAddress.getLoopbackAddress().getHostAddress()))); assertThat(hostAndPort.getPort(), allOf(greaterThan(0), lessThan(65536))); }