'Diffs should compose to create an aggregate diff.
Create a bunch of deployments and compute the incremental diffs from
one to the next. Compose all diffs together and apply the resulting
diff to the first deployment. Verify that the final deployment is the
result.'

@given(st.lists(deployment_strategy(), min_size=3, max_size=10))
def test_deployment_diffing_composable(self, deployments):

    reserialize = (lambda x: wire_decode(wire_encode(x)))
    deployment_diffs = list((reserialize(create_diff(a, b)) for (a, b) in zip(deployments[:(-1)], deployments[1:])))
    full_diff = reserialize(compose_diffs(deployment_diffs))
    self.assertThat(full_diff.apply(deployments[0]), Equals(deployments[(-1)]))
