@Test public void testBuilderCustomValues() { ProxyRouteConfig fallbackObject = new ProxyRouteConfig(ConfigFactory.load().getConfig("xio.proxyRouteTemplate")); List<HttpMethod> expectedMethods = Lists.newArrayList(HttpMethod.CONNECT); String expectedHost = "host"; String expectedPath = "/path/"; String expectedPermissionNeeded = "permissionNeeded"; List<ClientConfig> expectedClientConfigs = Lists.newArrayList( ClientConfig.newBuilder( ClientConfig.from(ConfigFactory.load().getConfig("xio.clientTemplate"))) .build()); ProxyRouteConfig.ProxyHostPolicy expectedProxyHostPolicy = ProxyRouteConfig.ProxyHostPolicy.UseConfigValue; String expectedProxyHost = "proxyHost"; String expectedProxyPath = "/proxyPath/"; ProxyRouteConfig subject = ProxyRouteConfig.newBuilder(fallbackObject) .setMethods(expectedMethods) .setHost(expectedHost) .setPath(expectedPath) .setPermissionNeeded(expectedPermissionNeeded) .setClientConfigs(expectedClientConfigs) .setProxyHostPolicy(expectedProxyHostPolicy) .setProxyHost(expectedProxyHost) .setProxyPath(expectedProxyPath) .build(); assertEquals(expectedMethods, subject.methods()); assertEquals(expectedHost, subject.host()); assertEquals(expectedPath, subject.path()); assertEquals(expectedPermissionNeeded, subject.permissionNeeded()); assertEquals(expectedClientConfigs, subject.clientConfigs()); assertEquals(expectedProxyHostPolicy, subject.proxyHostPolicy()); assertEquals(expectedProxyHost, subject.proxyHost()); assertEquals(expectedProxyPath, subject.proxyPath()); }
public static Builder newBuilder(ProxyRouteConfig fallbackObject) { return new Builder(fallbackObject); }
ProxyRouteConfig extends RouteConfig { public static Builder newBuilder(ProxyRouteConfig fallbackObject) { return new Builder(fallbackObject); } }
ProxyRouteConfig extends RouteConfig { public static Builder newBuilder(ProxyRouteConfig fallbackObject) { return new Builder(fallbackObject); } ProxyRouteConfig(Config config);  ProxyRouteConfig(
      List<HttpMethod> methods,
      String host,
      String path,
      String permissionNeeded,
      List<ClientConfig> clientConfigs,
      ProxyHostPolicy proxyHostPolicy,
      String proxyHost,
      String proxyPath); }
ProxyRouteConfig extends RouteConfig { public static Builder newBuilder(ProxyRouteConfig fallbackObject) { return new Builder(fallbackObject); } ProxyRouteConfig(Config config);  ProxyRouteConfig(
      List<HttpMethod> methods,
      String host,
      String path,
      String permissionNeeded,
      List<ClientConfig> clientConfigs,
      ProxyHostPolicy proxyHostPolicy,
      String proxyHost,
      String proxyPath); static Builder newBuilder(ProxyRouteConfig fallbackObject); }
ProxyRouteConfig extends RouteConfig { public static Builder newBuilder(ProxyRouteConfig fallbackObject) { return new Builder(fallbackObject); } ProxyRouteConfig(Config config);  ProxyRouteConfig(
      List<HttpMethod> methods,
      String host,
      String path,
      String permissionNeeded,
      List<ClientConfig> clientConfigs,
      ProxyHostPolicy proxyHostPolicy,
      String proxyHost,
      String proxyPath); static Builder newBuilder(ProxyRouteConfig fallbackObject);  }