Sequencer: state machine-based utility for synchronizing multi-threaded tests