public String method(HttpRequestBase method,final int expectedStatusCode){
  try {
    String result=client.execute(method,responseHandler(expectedStatusCode));
    LOG.debug("HTTP " + method.getMethod() + " returned: "+ result);
    return result;
  }
 catch (  IOException e) {
    fail(e.getMessage());
    return null;
  }
}

public String method ( HttpRequestBase method , final int expectedStatusCode ) { try { String result = client . execute ( method , responseHandler ( expectedStatusCode ) ) ; LOG . debug ( "HTTP " + method . getMethod ( ) + " returned: " + result ) ; return result ; } catch ( IOException e ) { fail ( e . getMessage ( ) ) ; return null ; } }
issue a http call and assert the response status code .
