@Test
    public void testBatchingWhenBatchSizeIsZero() throws MetaException {
        HiveMetaStoreClient spyMSC = spy(msc);
        hive.setMSC(spyMSC);
        int batchSize = 0;
        try {
            new PartitionIterable(hive, hive.getTable(dbName, tableName), null, batchSize);
        } catch (HiveException e) {
            Assert.assertTrue(e.getMessage().contains("Invalid batch size for partition iterable." +
                    " Please use a batch size greater than 0"));
        }
        try {
            new org.apache.hadoop.hive.metastore.PartitionIterable(msc, table, batchSize);
        } catch (MetastoreException e) {
            Assert.assertTrue(e.getMessage().contains("Invalid batch size for partition iterable." +
                    " Please use a batch size greater than 0"));
        }
    }
Tests the number of calls to getPartitions and the respective batch sizes when first call to
getPartitions throws HiveException. The batch size should be reduced by the decayingFactor
and the second call should fetch all the results

@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/exec/TestGetPartitionInBatches.java