@@ -0,0 +1,3235 @@
+package com.hubspot.baragon.service.worker;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport com.google.common.base.Optional;%0Aimport com.hubspot.baragon.models.BaragonRequest;%0Aimport com.hubspot.baragon.models.QueuedRequestId;%0Aimport com.hubspot.baragon.models.QueuedRequestWithState;%0Aimport com.hubspot.baragon.models.UpstreamInfo;%0A%0Apublic class BaragonRequestWorkerTest %7B%0A  private static final Logger LOG = LoggerFactory.getLogger(BaragonRequestWorkerTest.class);%0A%0A  @Test%0A  public void testQueuedRequestComparator() throws Exception %7B%0A    List%3CQueuedRequestWithState%3E queuedRequestsWithState = Arrays.asList(%0A        new QueuedRequestWithState(%0A            new QueuedRequestId(%22serviceA%22, %22requestIdA%22, 0),%0A            new BaragonRequest(%0A                %22requestIdA%22, null,%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.emptyList(), Optional.absent(), Optional.absent(), false, false, false, false),%0A            null%0A        ),%0A        new QueuedRequestWithState(%0A            new QueuedRequestId(%22serviceB%22, %22requestIdB%22, 0),%0A            new BaragonRequest(%0A                %22requestIdB%22, null,%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.emptyList(), Optional.absent(), Optional.absent(), true, true, false, false),%0A            null%0A        ),%0A        new QueuedRequestWithState(%0A            new QueuedRequestId(%22serviceC%22, %22requestIdC%22, 0),%0A            new BaragonRequest(%0A                %22requestIdC%22, null,%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.emptyList(), Optional.absent(), Optional.absent(), true, false, false, false),%0A            null%0A        ),%0A        new QueuedRequestWithState(%0A            new QueuedRequestId(%22serviceC%22, %22requestIdC%22, 0),%0A            new BaragonRequest(%0A                %22requestIdC%22, null,%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.singletonList(new UpstreamInfo(null, Optional.absent(), Optional.absent())),%0A                Collections.emptyList(), Optional.absent(), Optional.absent(), false, true, false, false),%0A            null%0A        )%0A    );%0A%0A    List%3CQueuedRequestWithState%3E sortedQueuedRequestsWithState = new ArrayList%3C%3E(queuedRequestsWithState);%0A    sortedQueuedRequestsWithState.sort(BaragonRequestWorker.queuedRequestComparator());%0A%0A    assertEquals(queuedRequestsWithState.get(1), sortedQueuedRequestsWithState.get(0));%0A    assertEquals(queuedRequestsWithState.get(0), sortedQueuedRequestsWithState.get(3));%0A  %7D%0A%7D%0A

Add test.