Assert.assertTrue(wi1.equals(wi1));
final WorkerInfo wi2 = new WorkerInfo();
Assert.assertEquals(0, wi1.compareTo(wi2));
Assert.assertTrue(wi1.equals(wi2));
Assert.assertEquals(wi1.hashCode(), wi2.hashCode());
final WorkerStatus status1 = new WorkerStatus();
wi1.setStatus(status1);
Assert.assertTrue(wi1.compareTo(wi2) > 0);
Assert.assertFalse(wi1.equals(wi2));
wi2.setStatus(status1);
Assert.assertEquals(0, wi1.compareTo(wi2));
Assert.assertTrue(wi1.equals(wi2));
Assert.assertEquals(wi1.hashCode(), wi2.hashCode());
wi1.setStatus(null);
Assert.assertTrue(wi1.compareTo(wi2) < 0);
Assert.assertFalse(wi1.equals(wi2));
wi1.setStatus(status1);
final Date runAt1 = new Date();
status1.setRunAt(runAt1);
Assert.assertEquals(0, wi1.compareTo(wi2));
Assert.assertTrue(wi1.equals(wi2));
Assert.assertEquals(wi1.hashCode(), wi2.hashCode());
final WorkerStatus status2 = new WorkerStatus();
wi2.setStatus(status2);
Assert.assertTrue(wi1.compareTo(wi2) > 0);
Assert.assertFalse(wi1.equals(wi2));
final Date runAt2 = new Date(runAt1.getTime() + 1000);
status2.setRunAt(runAt2);
Assert.assertTrue(wi1.compareTo(wi2) < 0);
Assert.assertFalse(wi1.equals(wi2));
status1.setRunAt(null);
Assert.assertTrue(wi1.compareTo(wi2) < 0);
Assert.assertFalse(wi1.equals(wi2));