} catch (InterruptedException e) {
e.printStackTrace();
fail( e.getMessage() );
}
List taskList = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_ALL );
assertNotNull( "There are no tasks to process", taskList );
for( Iterator iterator = taskList.iterator(); iterator.hasNext(); ) {
Task task = (Task)iterator.next();
taskService.setTaskStatus( task.getTaskID(), Task.TASK_COMPLETE );
}
List taskListAfterUpdate = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_COMPLETE );
assertEquals( "Updating of task status should not create another task", taskList.size(), taskListAfterUpdate.size() );
for( int i = 0; i < taskList.size(); i++ ) {
TaskID taskID1 = ((Task)taskList.get( i )).getTaskID();