@given(
        two_dataset_states=TWO_DESIRED_DATASET_STRATEGY,
        eventually_consistent=booleans(),
    )
    def test_simple_transitions(self, two_dataset_states,
                                eventually_consistent):
        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

        # Set the mountpoint to a real mountpoint in desired dataset states
        # that have a mount point attribute.
        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)

        # Converge to the initial state.
        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)

        # Converge from the initial state to the next state.
        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)
Given an initial empty state, ``BlockDeviceCalculator`` will converge
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/test/test_blockdevice.py/BlockDeviceCalculatorTests.test_simple_transitions