1313import org .apache .http .client .methods .HttpPost ;
1414import org .apache .http .client .protocol .HttpClientContext ;
1515import org .apache .http .message .BasicHttpResponse ;
16- import org .junit .After ;
17- import org .junit .AfterClass ;
18- import org .junit .Before ;
19- import org .junit .BeforeClass ;
2016import org .junit .Test ;
2117
2218public class RedirectHandlerTest {
@@ -31,7 +27,6 @@ public void testIsRedirectedFailure() {
3127 boolean isRedirected = redirectHandler .isRedirected (httpget , response , localContext );
3228 assertTrue (!isRedirected );
3329 } catch (ProtocolException e ) {
34- // TODO Auto-generated catch block
3530 e .printStackTrace ();
3631 fail ("Redirect handler isRedirect failure" );
3732 }
@@ -47,7 +42,6 @@ public void testIsRedirectedFailure1() {
4742 boolean isRedirected = redirectHandler .isRedirected (httpget , response , localContext );
4843 assertTrue (!isRedirected );
4944 } catch (ProtocolException e ) {
50- // TODO Auto-generated catch block
5145 e .printStackTrace ();
5246 fail ("Redirect handler isRedirect failure" );
5347 }
@@ -64,7 +58,6 @@ public void testIsRedirectedSuccess() {
6458 boolean isRedirected = redirectHandler .isRedirected (httpget , response , localContext );
6559 assertTrue (isRedirected );
6660 } catch (ProtocolException e ) {
67- // TODO Auto-generated catch block
6861 e .printStackTrace ();
6962 fail ("Redirect handler isRedirect failure" );
7063 }
@@ -83,7 +76,6 @@ public void testGetRedirectForGetMethod() {
8376 final String method = request .getRequestLine ().getMethod ();
8477 assertTrue (method .equalsIgnoreCase (HttpGet .METHOD_NAME ));
8578 } catch (ProtocolException e ) {
86- // TODO Auto-generated catch block
8779 e .printStackTrace ();
8880 fail ("Redirect handler isRedirect failure" );
8981 }
@@ -102,7 +94,6 @@ public void testGetRedirectForHeadMethod() {
10294 final String method = request .getRequestLine ().getMethod ();
10395 assertTrue (method .equalsIgnoreCase (HttpHead .METHOD_NAME ));
10496 } catch (ProtocolException e ) {
105- // TODO Auto-generated catch block
10697 e .printStackTrace ();
10798 fail ("Redirect handler isRedirect failure" );
10899 }
@@ -140,7 +131,6 @@ public void testGetRedirectForPostMethod1() {
140131 final String method = request .getRequestLine ().getMethod ();
141132 assertTrue (method .equalsIgnoreCase (HttpGet .METHOD_NAME ));
142133 } catch (ProtocolException e ) {
143- // TODO Auto-generated catch block
144134 e .printStackTrace ();
145135 fail ("Redirect handler isRedirect failure" );
146136 }
0 commit comments