function it_throws_an_exception_if_transition_cannot_be_applied($object, $dispatcher)
{
$object->getState()->shouldBeCalled()->willReturn('cancel');
$object->setState(Argument::any())->shouldNotBeCalled();
$dispatcher->dispatch(Argument::any())->shouldNotBeCalled();
$this->shouldThrow('SM\\SMException')->during('apply', array('confirm'));
}