@Test
    public void testNumberOfGetPartitionCalls2() throws Exception {
        HiveMetaStoreClient spyMSC = spy(msc);
        hive.setMSC(spyMSC);
        // test with a batch size of 10 and decaying factor of 2
        int batchSize = 10;
        hive.getAllPartitionsInBatches(hive.getTable(dbName, tableName), batchSize, DECAYING_FACTOR, MAX_RETRIES,
                new HashMap(), IS_AUTH_REQUIRED, USER_NAME, GROUP_NAMES);
        ArgumentCaptor<GetPartitionsPsWithAuthRequest> req = ArgumentCaptor.forClass(GetPartitionsPsWithAuthRequest.class);
        // there should be 3 calls to get partitions
        verify(spyMSC, times(3)).listPartitionsWithAuthInfoRequest(req.capture());
        req.getAllValues().forEach(part-> Assert.assertEquals(part.getPartNames().size(), 10));
    }
Tests the number of times Hive.getPartitions calls are executed with total number of
partitions to be added are equally divisible by batch size

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