public void onlyIfPredicateIsTrueWhenTaskIsEnabledAndAllPredicatesAreTrue() {
final AtomicBoolean condition1 = new AtomicBoolean(true);
final AtomicBoolean condition2 = new AtomicBoolean(true);
AbstractTask task = getTask();
task.onlyIf(new Spec<Task>() {
public boolean isSatisfiedBy(Task element) {
return condition1.get();
}
});
task.onlyIf(new Spec<Task>() {