'When there is a dataset that exists but is not manifest locally, it is
reported as a non-manifest dataset.
:param state: Either ``DatasetStates.NOT_MANIFEST``,
``DatasetStates.ATTACHED``,
``DatasetStates.ATTACHED_NO_FILESYSTEM`` or
``DatasetStates.ATTACHED_TO_DEAD_NODE``.
:param pass_device_path: If false don\'t create
``DiscoveredDataset`` with device path.'

def non_manifest_dataset_test(self, state, pass_device_path=True):

    dataset_id = uuid4()
    arguments = dict(state=state, dataset_id=dataset_id, blockdevice_id=ARBITRARY_BLOCKDEVICE_ID, maximum_size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE, device_path=FilePath('/dev/xvdf'))
    if (not pass_device_path):
        del arguments['device_path']
    local_state = BlockDeviceDeployerLocalState(node_uuid=self.node_uuid, hostname=self.hostname, datasets={dataset_id: DiscoveredDataset(**arguments)})
    devices = {}
    if pass_device_path:
        devices[dataset_id] = FilePath('/dev/xvdf')
    expected_changes = (NodeState(uuid=self.node_uuid, hostname=self.hostname, manifestations={}, paths={}, devices=devices, applications=None), NonManifestDatasets(datasets={unicode(dataset_id): Dataset(dataset_id=dataset_id, maximum_size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE)}))
    self.assertEqual(local_state.shared_state_changes(), expected_changes)
