@@ -0,0 +1,2696 @@
+package net.greghaines.jesque.meta;%0A%0Aimport java.util.Arrays;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0Aimport net.greghaines.jesque.WorkerStatus;%0Aimport net.greghaines.jesque.meta.WorkerInfo.State;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class TestWorkerInfo %7B%0A%0A    @Test%0A    public void testProperties() %7B%0A        final WorkerInfo wInfo = new WorkerInfo();%0A        final String name = %22foo%22;%0A        wInfo.setName(name);%0A        Assert.assertEquals(name, wInfo.getName());%0A        Assert.assertEquals(name, wInfo.toString());%0A        final State state = State.IDLE;%0A        wInfo.setState(state);%0A        Assert.assertEquals(state, wInfo.getState());%0A        final Date started = new Date();%0A        wInfo.setStarted(started);%0A        Assert.assertEquals(started, wInfo.getStarted());%0A        final Long processed = 3l;%0A        wInfo.setProcessed(processed);%0A        Assert.assertEquals(processed, wInfo.getProcessed());%0A        final Long failed = 4l;%0A        wInfo.setFailed(failed);%0A        Assert.assertEquals(failed, wInfo.getFailed());%0A        final String host = %22bar%22;%0A        wInfo.setHost(host);%0A        Assert.assertEquals(host, wInfo.getHost());%0A        final String pid = %22123%22;%0A        wInfo.setPid(pid);%0A        Assert.assertEquals(pid, wInfo.getPid());%0A        final List%3CString%3E queues = Arrays.asList(%22queue1%22, %22queue2%22);%0A        wInfo.setQueues(queues);%0A        Assert.assertEquals(queues, wInfo.getQueues());%0A        final WorkerStatus status = new WorkerStatus();%0A        wInfo.setStatus(status);%0A        Assert.assertEquals(status, wInfo.getStatus());%0A    %7D%0A    %0A    @Test%0A    public void testCompareTo() %7B%0A        final WorkerInfo qi1 = new WorkerInfo();%0A        Assert.assertTrue(qi1.compareTo(null) %3E 0);%0A        final WorkerInfo qi2 = new WorkerInfo();%0A        Assert.assertEquals(0, qi1.compareTo(qi2));%0A        final WorkerStatus status1 = new WorkerStatus();%0A        qi1.setStatus(status1);%0A        Assert.assertTrue(qi1.compareTo(qi2) %3E 0);%0A        qi2.setStatus(status1);%0A        Assert.assertEquals(0, qi1.compareTo(qi2));%0A        qi1.setStatus(null);%0A        Assert.assertTrue(qi1.compareTo(qi2) %3C 0);%0A        qi1.setStatus(status1);%0A        final Date runAt1 = new Date();%0A        status1.setRunAt(runAt1);%0A        Assert.assertEquals(0, qi1.compareTo(qi2));%0A        final WorkerStatus status2 = new WorkerStatus();%0A        qi2.setStatus(status2);%0A        Assert.assertTrue(qi1.compareTo(qi2) %3E 0);%0A        final Date runAt2 = new Date(runAt1.getTime() + 1000);%0A        status2.setRunAt(runAt2);%0A        Assert.assertTrue(qi1.compareTo(qi2) %3C 0);%0A        status1.setRunAt(null);%0A        Assert.assertTrue(qi1.compareTo(qi2) %3C 0);%0A    %7D%0A%7D%0A

Test WorkerInfo