/**
   * Test of both getSupportLevel methods, of class
   * org.mmbase.storage.search.implementation.database.ChainedSqlHandler.
   */
  public void testGetSupportLevel() throws Exception {
    // test method getSupport(int,SearchQuery)
    assertTrue(
        instance.getSupportLevel(SearchQueryHandler.FEATURE_MAX_NUMBER, query)
            == TEST_SUPPORT_LEVEL);

    // test method getSupport(Constraint,SearchQuery)
    Constraint constraint = new BasicCompositeConstraint(CompositeConstraint.LOGICAL_AND);
    assertTrue(instance.getSupportLevel(constraint, query) == TEST_SUPPORT_LEVEL);
  }
 /**
  * Test of appendQueryBodyToSql method, of class
  * org.mmbase.storage.search.implementation.database.ChainedSqlHandler.
  */
 public void testAppendQueryBodyToSql() throws Exception {
   StringBuilder sb = new StringBuilder();
   instance.appendQueryBodyToSql(sb, query, instance);
   String queryBody = sb.toString();
   sb.setLength(0);
   testSuccessor.appendQueryBodyToSql(sb, query, instance);
   String queryBody2 = sb.toString();
   assertTrue(queryBody.length() > 0);
   assertTrue(queryBody.equals(queryBody2));
 }
 /**
  * Test of appendConstraintToSql method, of class
  * org.mmbase.storage.search.implementation.database.ChainedSqlHandler.
  */
 public void testAppendConstraintToSql() throws Exception {
   StringBuilder sb = new StringBuilder();
   Constraint constraint = new BasicCompositeConstraint(CompositeConstraint.LOGICAL_AND);
   instance.appendConstraintToSql(sb, constraint, query, false, false);
   String strConstraint = sb.toString();
   sb.setLength(0);
   testSuccessor.appendConstraintToSql(sb, constraint, query, false, false);
   String queryBody2 = sb.toString();
   assertTrue(strConstraint.length() > 0);
   assertTrue(strConstraint.equals(queryBody2));
 }
 /**
  * Test of toSql method, of class
  * org.mmbase.storage.search.implementation.database.ChainedSqlHandler.
  */
 public void testToSql() throws Exception {
   String sql = instance.toSql(query, instance);
   assertTrue(sql != null);
   assertTrue(sql.equals(testSuccessor.toSql(query, instance)));
 }
 /**
  * Test of getSuccessor method, of class
  * org.mmbase.storage.search.implementation.database.ChainedSqlHandler.
  */
 public void testGetSuccessor() {
   assertTrue(instance.getSuccessor() == testSuccessor);
 }
 /**
  * Test of getAllowedValue method, of class
  * org.mmbase.storage.search.implementation.database.ChainedSqlHandler.
  */
 public void testGetAllowedValue() {
   String result = instance.getAllowedValue(TEST);
   assertTrue(result.length() > 0);
   assertTrue(result.equals(testSuccessor.getAllowedValue(TEST)));
 }