'Given an initial empty state, ``BlockDeviceCalculator`` will converge
to any ``DesiredDataset``, followed by any other state of the same
dataset.'

@given(two_dataset_states=TWO_DESIRED_DATASET_STRATEGY, eventually_consistent=booleans(), random=random_module())
def test_simple_transitions(self, two_dataset_states, eventually_consistent, random):

    self.deployer = create_blockdevicedeployer(self, eventually_consistent=eventually_consistent)
    self.persistent_state = InMemoryStatePersister()
    (initial_dataset, next_dataset) = two_dataset_states
    dataset_id = initial_dataset.dataset_id
    mount_point = self.deployer._mountpath_for_dataset_id(unicode(dataset_id))
    if (getattr(initial_dataset, 'mount_point', _NoSuchThing) is not _NoSuchThing):
        initial_dataset = initial_dataset.set(mount_point=mount_point)
    if (getattr(next_dataset, 'mount_point', _NoSuchThing) is not _NoSuchThing):
        next_dataset = next_dataset.set(mount_point=mount_point)
    try:
        self.run_to_convergence([initial_dataset])
    except DidNotConverge as e:
        self.fail(('Did    not    converge    to    initial    state    after    %d    iterations.' % e.iteration_count))
    try:
        self.run_to_convergence([next_dataset])
    except DidNotConverge as e:
        self.fail(('Did    not    converge    to    next    state    after    %d    iterations.' % e.iteration_count))
