@Test
public void shouldOrderRunningFirst() {

    List<AsyncExecution> unOrderedAsyncs = Lists.newArrayList(buildAsyncExecution(AsyncExecution.Status.NEW, 100L),
            buildAsyncExecution(AsyncExecution.Status.DONE, 100L),
            buildAsyncExecution(AsyncExecution.Status.RUNNING, 100L),
            buildAsyncExecution(AsyncExecution.Status.CANCELLED, 100L),
            buildAsyncExecution(AsyncExecution.Status.FAILED, 100L));
    unOrderedAsyncs.sort(naturalOrder());
    assertEquals(AsyncExecution.Status.RUNNING, unOrderedAsyncs.get(0).getStatus());
}