}
@Test
public void testEquals() {
TaskId id1 = new TaskId("id", new Date());
UnrecognizedTask task1 = new UnrecognizedTask(id1);
assertFalse(task1.equals(null));
assertTrue(task1.equals(task1));
TaskId id2 = new TaskId("abc", new Date());
UnrecognizedTask task2 = new UnrecognizedTask(id2);
assertFalse(task1.equals(task2));
id2 = new TaskId(id1.getHandleIdentifier(), new Date(id1.getCreationDate()
.getTime() - 1000)); // 1 second difference
task2 = new UnrecognizedTask(id2);
assertFalse(task1.equals(task2));
id2 = new TaskId("133444459", id1.getCreationDate());
task2 = new UnrecognizedTask(id2);
assertFalse(task1.equals(task2));
id2 = new TaskId(id1.getHandleIdentifier(), id1.getCreationDate());
task2 = new UnrecognizedTask(id2);
assertTrue(task1.equals(task2));
}