OkHttpChannelBuilder extends
        AbstractManagedChannelImplBuilder<OkHttpChannelBuilder> { public static OkHttpChannelBuilder forAddress(String host, int port) { return new OkHttpChannelBuilder(host, port); } protected  OkHttpChannelBuilder(String host, int port); private  OkHttpChannelBuilder(String target); static OkHttpChannelBuilder forAddress(String host, int port); static OkHttpChannelBuilder forTarget(String target); final OkHttpChannelBuilder transportExecutor(@Nullable Executor transportExecutor); final OkHttpChannelBuilder negotiationType(NegotiationType type); final OkHttpChannelBuilder sslSocketFactory(SSLSocketFactory factory); final OkHttpChannelBuilder connectionSpec(ConnectionSpec connectionSpec); final OkHttpChannelBuilder maxMessageSize(int maxMessageSize); @Override final OkHttpChannelBuilder usePlaintext(boolean skipNegotiation); static final ConnectionSpec DEFAULT_CONNECTION_SPEC; }
@Test public void failInvalidAuthority() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Invalid host or port"); OkHttpChannelBuilder.forAddress("invalid_authority", 1234); }