@Test
  public void testEqualNumberOfPartitions() throws Exception {
    // create 13 dummy partitions
    Set<PartitionResult> partsNotInMs = PartitionUtil.createPartsNotInMs(13);
    IMetaStoreClient spyDb = spy(db);
    // batch size of 13 and decaying factor of 2
    msck.createPartitionsInBatches(spyDb, repairOutput, partsNotInMs, table, 13, 2, 0);
    // there should be 1 call to create partitions with batch sizes of 13
    ArgumentCaptor<Boolean> ifNotExistsArg = ArgumentCaptor.forClass(Boolean.class);
    ArgumentCaptor<Boolean> needResultsArg = ArgumentCaptor.forClass(Boolean.class);
    ArgumentCaptor<List<Partition>> argParts = ArgumentCaptor.forClass((Class) List.class);
    // there should be 1 call to create partitions with batch sizes of 13
    verify(spyDb, times(1)).add_partitions(argParts.capture(), ifNotExistsArg.capture(),
      needResultsArg.capture());
    Assert.assertEquals("Unexpected number of batch size", 13,
        argParts.getValue().size());
    assertTrue(ifNotExistsArg.getValue());
    assertFalse(needResultsArg.getValue());
  }
Tests the number of times Hive.createPartitions calls are executed with total number of
partitions exactly equal to batch size

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