@Test
    public void testUnevenNumberOfGetPartitionCalls() throws Exception {
        HiveMetaStoreClient spyMSC = spy(msc);
        hive.setMSC(spyMSC);
        // there should be 2 calls to get partitions with batch sizes of 19, 11
        int batchSize = 19;
        hive.getAllPartitionsInBatches(hive.getTable(dbName, tableName),batchSize, DECAYING_FACTOR, MAX_RETRIES,
                PARTIAL_PARTITION_SPEC, IS_AUTH_REQUIRED, USER_NAME, GROUP_NAMES);
        ArgumentCaptor<GetPartitionsPsWithAuthRequest> req = ArgumentCaptor.forClass(GetPartitionsPsWithAuthRequest.class);
        // there should be 2 calls to get partitions
        verify(spyMSC, times(2)).listPartitionsWithAuthInfoRequest(req.capture());
        // confirm the batch sizes were 19, 11 in the two calls to get partitions
        List<GetPartitionsPsWithAuthRequest> apds = req.getAllValues();
        Assert.assertEquals(19, apds.get(0).getPartNames().size());
        Assert.assertEquals(11, apds.get(1).getPartNames().size());
    }
Tests the number of times Hive.getAllPartitionsOf calls are executed with total number of
partitions to be added are not exactly divisible by batch size

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