Use braces between the values, and new line
Separate setStateMachine. Set the state correctly before firing every events. Report an error if we reach end before hitting the required bootstrapmin