'Calling ``local_state_from_shared_state`` followed by ``
``BlockDeviceDeployerLocalState.shared_state_changes`` on
the state changes of a ``BlockDeviceDeployerLocalState`` is
idempotent.'

@given(local_state=builds(BlockDeviceDeployerLocalState, node_uuid=uuids(), hostname=text(), datasets=lists(DISCOVERED_DATASET_STRATEGY).map(dataset_map_from_iterable)))
def test_round_trip(self, local_state):

    (node_state, nonmanifest_datasets) = local_state.shared_state_changes()
    fake_local_state = local_state_from_shared_state(node_state=node_state, nonmanifest_datasets=nonmanifest_datasets.datasets)
    self.assertEqual(local_state.shared_state_changes(), fake_local_state.shared_state_changes())
