<!--
   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);

    <InputColumnVectorType> inputColumnVector =
      VectorizedRowGroupGenUtil.generate<InputColumnVectorType>(<ColumnHasNulls>,
      <ColumnIsRepeating>, BATCH_SIZE, rand);

    VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE);
    rowBatch.cols[0] = inputColumnVector;

    <ScalarType> scalarValue = 0;
    do {
      scalarValue = rand.next<CamelCaseScalarType>();
    } while(scalarValue == 0);

    <VectorExpClassName> vectorExpression =
      new <VectorExpClassName>(<ConstructorParams>);

    vectorExpression.evaluate(rowBatch);

    
    int selectedIndex = 0;
    int i=0;
    //check for isRepeating optimization
    if(inputColumnVector.isRepeating) {
      //null vector is safe to check, as it is always initialized to match the data vector
      selectedIndex =
        !inputColumnVector.isNull[i] && <Operand1> <Operator> <Operand2>
          ? BATCH_SIZE : 0;
    } else {
      for(i = 0; i < BATCH_SIZE; i++) {
        if(!inputColumnVector.isNull[i]) {
          if(<Operand1> <Operator> <Operand2>) {
            assertEquals(
              "Vector index that passes filter "
              + <Operand1> + "<Operator>"
              + <Operand2> + " 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);
    }
  }
