@Test(expected = IOException.class) public void testBadURL() throws IOException { final URL url = PowerMock.createMock(URL.class); url.openConnection(); PowerMock.expectLastCall().andThrow(new IOException()); replayAll(); JSONParser.getJSONFromURL(url, ImageIngester.DEFAULT_CONNECT_TIMEOUT); }
public static JsonNode getJSONFromURL(final URL url, final int connectTimeout) throws IOException { return getJSONFromURL(url, null, connectTimeout); }
JSONParser { public static JsonNode getJSONFromURL(final URL url, final int connectTimeout) throws IOException { return getJSONFromURL(url, null, connectTimeout); } }
JSONParser { public static JsonNode getJSONFromURL(final URL url, final int connectTimeout) throws IOException { return getJSONFromURL(url, null, connectTimeout); } private  JSONParser(); }
JSONParser { public static JsonNode getJSONFromURL(final URL url, final int connectTimeout) throws IOException { return getJSONFromURL(url, null, connectTimeout); } private  JSONParser(); static JsonNode getJSONFromURL(final URL url, final int connectTimeout); static JsonNode getJSONFromURL(final URL url, final String expectedETag, final int connectTimeout); }
JSONParser { public static JsonNode getJSONFromURL(final URL url, final int connectTimeout) throws IOException { return getJSONFromURL(url, null, connectTimeout); } private  JSONParser(); static JsonNode getJSONFromURL(final URL url, final int connectTimeout); static JsonNode getJSONFromURL(final URL url, final String expectedETag, final int connectTimeout); static final ObjectMapper MAPPER; }