Attempts to transition to a new state. Either a new MachineState is returned reflecting the change, or an exception is thrown.