A DSL for creating finite state machines in Java