'When called with the result of ``in_parallel``, ``run_state_changes``
returns a ``Deferred`` that fires with the failure which occurs first.'

def test_failure_result(self):

    subchanges = [ControllableAction(result=fail(RuntimeError()))]
    change = in_parallel(changes=subchanges)
    result = run_state_change(change, DEPLOYER, InMemoryStatePersister())
    failure = self.failureResultOf(result, FirstError)
    self.assertEqual(failure.value.subFailure.type, RuntimeError)
