@Test
  public void testMultipleRangeJunctionsInAGroupJunction() {
    QCompiler compiler = new QCompiler();
    List list = compiler.compileFromClause(SEPARATOR + "portfolio p, p.positions");
    ExecutionContext context = new QueryExecutionContext(null, CacheUtils.getCache());
    context.newScope(context.associateScopeID());
    try {
      qs.createIndex("statusIndex", IndexType.FUNCTIONAL, "status", SEPARATOR + "portfolio");
      qs.createIndex("idIndex", IndexType.FUNCTIONAL, "ID", SEPARATOR + "portfolio");
      for (final Object o : list) {
        CompiledIteratorDef iterDef = (CompiledIteratorDef) o;
        context.addDependencies(new CompiledID("dummy"), iterDef.computeDependencies(context));
        RuntimeIterator rIter = iterDef.getRuntimeIterator(context);
        context.bindIterator(rIter);
        context.addToIndependentRuntimeItrMap(iterDef);
      }

      // case id > 7 and id < 10 and status > abc and status < xyz
      CompiledComparison[] cv = new CompiledComparison[4];

      cv[0] = new CompiledComparison(new CompiledPath(new CompiledID("p"), "ID"),
          new CompiledLiteral(7), OQLLexerTokenTypes.TOK_GT);
      cv[1] = new CompiledComparison(new CompiledPath(new CompiledID("p"), "status"),
          new CompiledLiteral("abc"), OQLLexerTokenTypes.TOK_GT);
      cv[2] = new CompiledComparison(new CompiledPath(new CompiledID("p"), "ID"),
          new CompiledLiteral(10), OQLLexerTokenTypes.TOK_LT);
      cv[3] = new CompiledComparison(new CompiledPath(new CompiledID("p"), "status"),
          new CompiledLiteral("xyz"), OQLLexerTokenTypes.TOK_LT);
      CompiledJunction cj = new CompiledJunction(cv, OQLLexerTokenTypes.LITERAL_and);
      context.addDependencies(new CompiledID("dummy"), cj.computeDependencies(context));
      cj.getPlanInfo(context);
      OrganizedOperands oo = cj.testOrganizedOperands(context);
      assertNotNull("The Organized operand object is null", oo);
      assertTrue("Filter Operand  did not happen to be an instance of GroupJunction",
          oo.filterOperand instanceof GroupJunction);
      assertNull("Iterate Operand  not coming out to be null", oo.iterateOperand);
      assertTrue("The Conditions in GroupJunction not equal to 2",
          ((GroupJunction) oo.filterOperand).getOperands().size() == 2);
      GroupJunction gj = (GroupJunction) oo.filterOperand;
      assertTrue(gj.getOperands().get(0) instanceof RangeJunction);
      assertTrue(gj.getOperands().get(1) instanceof RangeJunction);
      RangeJunction r1 = (RangeJunction) gj.getOperands().get(0);
      RangeJunction r2 = (RangeJunction) gj.getOperands().get(1);
      assertEquals(2, r1._operands.length);
      assertEquals(2, r2._operands.length);
      OrganizedOperands oo2 = r1.organizeOperands(context);
      assertTrue(RangeJunction.isInstanceOfDoubleCondnRangeJunctionEvaluator(oo2.filterOperand));
      oo2 = r2.organizeOperands(context);
      assertTrue(RangeJunction.isInstanceOfDoubleCondnRangeJunctionEvaluator(oo2.filterOperand));

    } catch (Exception e) {
      e.printStackTrace();
      fail("Test failed sue to Exception = " + e);
    }
  }
**********************************************
AND JUNCTION TESTS. RangeJunction related tests when part of GroupJunction,
CompositeGroupJunction or AllGroupJunction
************************************************
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/CompiledJunctionInternalsJUnitTest.java