@Test public void testProcessURL_securityNotSetup() throws Exception { URLStreamProvider urlStreamProvider = createMockBuilder(URLStreamProvider.class). withConstructor(Integer.TYPE, Integer.TYPE, String.class, String.class, String.class). withArgs(1000, 1000, null, null, null). addMockedMethod("getAppCookieManager"). addMockedMethod("getConnection", String.class). createMock(); Map<String, List<String>> headerMap = new HashMap<String, List<String>>(); headerMap.put("Header1", Collections.singletonList("value")); headerMap.put("Cookie", Collections.singletonList("FOO=bar")); replay(urlStreamProvider); try { urlStreamProvider.processURL("https: Assert.fail("Expected IllegalStateException"); } catch (IllegalStateException e) { } verify(urlStreamProvider); }
public HttpURLConnection processURL(String spec, String requestMethod, String body, Map<String, List<String>> headers) throws IOException { return processURL(spec, requestMethod, body == null ? null : body.getBytes(), headers); }
URLStreamProvider implements StreamProvider { public HttpURLConnection processURL(String spec, String requestMethod, String body, Map<String, List<String>> headers) throws IOException { return processURL(spec, requestMethod, body == null ? null : body.getBytes(), headers); } }
URLStreamProvider implements StreamProvider { public HttpURLConnection processURL(String spec, String requestMethod, String body, Map<String, List<String>> headers) throws IOException { return processURL(spec, requestMethod, body == null ? null : body.getBytes(), headers); } URLStreamProvider(int connectionTimeout, int readTimeout,
                           ComponentSSLConfiguration configuration);  URLStreamProvider(int connectionTimeout, int readTimeout, String trustStorePath,
                           String trustStorePassword, String trustStoreType); }
URLStreamProvider implements StreamProvider { public HttpURLConnection processURL(String spec, String requestMethod, String body, Map<String, List<String>> headers) throws IOException { return processURL(spec, requestMethod, body == null ? null : body.getBytes(), headers); } URLStreamProvider(int connectionTimeout, int readTimeout,
                           ComponentSSLConfiguration configuration);  URLStreamProvider(int connectionTimeout, int readTimeout, String trustStorePath,
                           String trustStorePassword, String trustStoreType); void setSetupTruststoreForHttps(boolean setupTruststoreForHttps); boolean getSetupTruststoreForHttps(); @Override InputStream readFrom(String spec, String requestMethod, String params); @Override InputStream readFrom(String spec); HttpURLConnection processURL(String spec, String requestMethod, String body, Map<String, List<String>> headers); HttpURLConnection processURL(String spec, String requestMethod, InputStream body, Map<String, List<String>> headers); HttpURLConnection processURL(String spec, String requestMethod, byte[] body, Map<String, List<String>> headers); synchronized AppCookieManager getAppCookieManager(); static String appendCookie(String cookies, String newCookie); }
URLStreamProvider implements StreamProvider { public HttpURLConnection processURL(String spec, String requestMethod, String body, Map<String, List<String>> headers) throws IOException { return processURL(spec, requestMethod, body == null ? null : body.getBytes(), headers); } URLStreamProvider(int connectionTimeout, int readTimeout,
                           ComponentSSLConfiguration configuration);  URLStreamProvider(int connectionTimeout, int readTimeout, String trustStorePath,
                           String trustStorePassword, String trustStoreType); void setSetupTruststoreForHttps(boolean setupTruststoreForHttps); boolean getSetupTruststoreForHttps(); @Override InputStream readFrom(String spec, String requestMethod, String params); @Override InputStream readFrom(String spec); HttpURLConnection processURL(String spec, String requestMethod, String body, Map<String, List<String>> headers); HttpURLConnection processURL(String spec, String requestMethod, InputStream body, Map<String, List<String>> headers); HttpURLConnection processURL(String spec, String requestMethod, byte[] body, Map<String, List<String>> headers); synchronized AppCookieManager getAppCookieManager(); static String appendCookie(String cookies, String newCookie); static final String COOKIE; }