def _assert_transition(self, event):
        """Asserts the state transition validity."""
        state = self.domain.state()[0]
        if event not in STATES_MAP[state]:
            raise RuntimeError("State transition %s not allowed" % event)