@Test(expected = HttpPirasoException.class) public void testStopInvalidStatusCode() throws Exception { StatusLine line = new BasicStatusLine(new ProtocolVersion("http", 1, 0), HttpStatus.SC_BAD_REQUEST, "Bad Request"); doReturn(line).when(response).getStatusLine(); reader.stop(); }
public void stop() throws IOException { if(!startHandler.isComplete()) { stopHandler.setTargetHost(targetHost); stopHandler.setUri(uri); stopHandler.setId(startHandler.getId()); stopHandler.execute(); } }
HttpPirasoEntryReader { public void stop() throws IOException { if(!startHandler.isComplete()) { stopHandler.setTargetHost(targetHost); stopHandler.setUri(uri); stopHandler.setId(startHandler.getId()); stopHandler.execute(); } } }
HttpPirasoEntryReader { public void stop() throws IOException { if(!startHandler.isComplete()) { stopHandler.setTargetHost(targetHost); stopHandler.setUri(uri); stopHandler.setId(startHandler.getId()); stopHandler.execute(); } } HttpPirasoEntryReader(HttpClient client, HttpContext context); }
HttpPirasoEntryReader { public void stop() throws IOException { if(!startHandler.isComplete()) { stopHandler.setTargetHost(targetHost); stopHandler.setUri(uri); stopHandler.setId(startHandler.getId()); stopHandler.execute(); } } HttpPirasoEntryReader(HttpClient client, HttpContext context); void setUri(String uri); HttpPirasoStartHandler getStartHandler(); void start(); boolean isComplete(); boolean testConnection(); void stop(); }
HttpPirasoEntryReader { public void stop() throws IOException { if(!startHandler.isComplete()) { stopHandler.setTargetHost(targetHost); stopHandler.setUri(uri); stopHandler.setId(startHandler.getId()); stopHandler.execute(); } } HttpPirasoEntryReader(HttpClient client, HttpContext context); void setUri(String uri); HttpPirasoStartHandler getStartHandler(); void start(); boolean isComplete(); boolean testConnection(); void stop();  }