write test for batches