Future<void> delay(Duration duration) { return simulateDelays ? Future.delayed(duration) : Future.value(); }