@Test
public void testQueuedRequestsAreBatchedForAgent() throws Exception {

  String agentUrl = "http://agent1";
  startAgent(agentUrl, TEST_LB_GROUP);
  requestManager.enqueueRequest(createBaseRequest("request1", "service1", ImmutableSet.of(TEST_LB_GROUP)).build());
  requestManager.enqueueRequest(createBaseRequest("request2", "service2", ImmutableSet.of(TEST_LB_GROUP)).build());
  requestWorker.run(); // move from pending -> send apply
  requestWorker.run(); // actually send
  Assertions.assertEquals(2, testAgentManager.getRecentBatches().get(agentUrl).size());
}