'When called with the result of ``in_parallel``, ``run_state_changes``
returns a ``Deferred`` that fires with the first exception raised
(synchronously, not returned as a ``Failure``).'

def test_exception_result(self):

    subchanges = [BrokenAction(exception=CustomException())]
    change = in_parallel(changes=subchanges)
    result = run_state_change(change, DEPLOYER, InMemoryStatePersister())
    failure = self.failureResultOf(result, FirstError)
    self.assertEqual(failure.value.subFailure.type, CustomException)
