public boolean matches(Object argument) {
if (!(argument instanceof TaskStateChange)) {
return false;
}
TaskStateChange change = (TaskStateChange) argument;
return taskId.equals(Tasks.id(change.getTask()))
&& (from == change.getOldState().get())
&& (to == change.getNewState());
}