public static void assertQEx(String message,SolrQueryRequest req,int code){
  try {
    ignoreException(".");
    h.query(req);
    fail(message);
  }
 catch (  SolrException sex) {
    assertEquals(code,sex.code());
  }
catch (  Exception e2) {
    throw new RuntimeException("Exception during query",e2);
  }
 finally {
    unIgnoreException(".");
  }
}

public static void assertQEx ( String message , SolrQueryRequest req , int code ) { try { ignoreException ( "." ) ; h . query ( req ) ; fail ( message ) ; } catch ( SolrException sex ) { assertEquals ( code , sex . code ( ) ) ; } catch ( Exception e2 ) { throw new RuntimeException ( "Exception during query" , e2 ) ; } finally { unIgnoreException ( "." ) ; } }
makes sure a query throws a solrexception with the listed response code
