Async state machine JUnit test