@Test public void computeOptimizedScanFalseFilter() {
    KafkaScanTrimmer kafkaScanTrimmer = new KafkaScanTrimmer(fullHouse, null);
    ExprNodeGenericFuncDesc
        falseFilter =
        and(Lists.newArrayList(eq(Lists.newArrayList(partitionColumn, zeroInt)),
            eq(Lists.newArrayList(partitionColumn, threeInt))));

    assertNotNull(falseFilter);
    Map
        actual =
        kafkaScanTrimmer.computeOptimizedScan(SerializationUtilities
            .deserializeExpression(SerializationUtilities.serializeExpression(falseFilter)));
    Assert.assertTrue(actual.isEmpty());

    ExprNodeGenericFuncDesc
        falseFilter2 =
        and(Lists.newArrayList(eq(Lists.newArrayList(offsetColumn, thirtyFiveLong)),
            eq(Lists.newArrayList(offsetColumn, fortyLong))));

    assertNotNull(falseFilter2);
    actual =
        kafkaScanTrimmer.computeOptimizedScan(SerializationUtilities
            .deserializeExpression(SerializationUtilities.serializeExpression(falseFilter2)));
    Assert.assertTrue(actual.isEmpty());

    ExprNodeGenericFuncDesc filter3 = or(Lists.newArrayList(falseFilter, falseFilter2));

    assertNotNull(filter3);
    actual =
        kafkaScanTrimmer.computeOptimizedScan(SerializationUtilities
            .deserializeExpression(SerializationUtilities.serializeExpression(filter3)));
    Assert.assertTrue(actual.isEmpty());

    ExprNodeGenericFuncDesc
        filter4 =
        and(Lists.newArrayList(filter3, eq(Lists.newArrayList(partitionColumn, zeroInt))));
    assertNotNull(filter4);
    actual =
        kafkaScanTrimmer.computeOptimizedScan(SerializationUtilities
            .deserializeExpression(SerializationUtilities.serializeExpression(filter4)));
    Assert.assertTrue(actual.isEmpty());
  }
Test Class for Kafka Trimmer Class.
kafka-handler/src/test/org/apache/hadoop/hive/kafka/KafkaScanTrimmerTest.java