use of com.google.api.gax.rpc.Batch.BatchMergerImpl in project gax-java by googleapis.
the class BatchTest method testBatchMergerImpl.
@Test
public void testBatchMergerImpl() {
LabeledIntList request1 = new LabeledIntList("lable", 1);
Batch<LabeledIntList, List<Integer>> batch1 = createBatch(request1);
LabeledIntList request2 = new LabeledIntList("lable", 2);
Batch<LabeledIntList, List<Integer>> batch2 = createBatch(request2);
BatchMergerImpl<LabeledIntList, List<Integer>> batchMerger = new BatchMergerImpl<>();
batchMerger.merge(batch1, batch2);
Truth.assertThat(batch1.getByteCount()).isEqualTo(3);
}
Aggregations