<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
  @Test
  public void <TestName>() {

    Random rand = new Random(SEED);

    <InputColumnVectorType1> inputColumnVector1 =
      VectorizedRowGroupGenUtil.generate<InputColumnVectorType1>(<Column1HasNulls>,
      <Column1IsRepeating>, BATCH_SIZE, rand);

    <InputColumnVectorType2> inputColumnVector2 =
      VectorizedRowGroupGenUtil.generate<InputColumnVectorType2>(<Column2HasNulls>,
      <Column2IsRepeating>, BATCH_SIZE, rand);

    VectorizedRowBatch rowBatch = new VectorizedRowBatch(2, BATCH_SIZE);
    rowBatch.cols[0] = inputColumnVector1;
    rowBatch.cols[1] = inputColumnVector2;

    <VectorExpClassName> vectorExpression =
      new <VectorExpClassName>(0, 1);

    vectorExpression.evaluate(rowBatch);

    int selectedIndex = 0;
    for(int i = 0; i < BATCH_SIZE; i++) {
      //null vector is safe to check, as it is always initialized to match the data vector
      if(!inputColumnVector1.isNull[i] && !inputColumnVector2.isNull[i]) {
        if(inputColumnVector1.vector[i] <Operator> inputColumnVector2.vector[i]) {
          assertEquals(
            "Vector index that passes filter "
            + inputColumnVector1.vector[i] + "<Operator>"
            + inputColumnVector2.vector[i] + " is not in rowBatch selected index",
            i,
            rowBatch.selected[selectedIndex]);
          selectedIndex++;
        }
      }
    }

    assertEquals("Row batch size not set to number of selected rows: " + selectedIndex,
      selectedIndex, rowBatch.size);

    if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) {
      assertEquals(
        "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: "
        + selectedIndex,
        true, rowBatch.selectedInUse);
    } else if(selectedIndex == BATCH_SIZE) {
      assertEquals(
        "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: "
        + selectedIndex,
        false, rowBatch.selectedInUse);
    }
  }