'When the cluster state includes more than one dataset, the endpoint
returns a list containing the datasets in arbitrary order.'

def test_two_datasets(self):

    expected_dataset1 = Dataset(dataset_id=unicode(uuid4()))
    expected_uuid1 = uuid4()
    expected_manifestation1 = Manifestation(dataset=expected_dataset1, primary=True)
    expected_hostname1 = u'192.0.2.101'
    expected_dataset2 = Dataset(dataset_id=unicode(uuid4()))
    expected_manifestation2 = Manifestation(dataset=expected_dataset2, primary=True)
    expected_hostname2 = u'192.0.2.102'
    expected_uuid2 = uuid4()
    self.cluster_state_service.apply_changes([NodeState(uuid=expected_uuid1, hostname=expected_hostname1, manifestations={expected_dataset1.dataset_id: expected_manifestation1}, paths={expected_dataset1.dataset_id: FilePath('/aa')}, devices={}), NodeState(uuid=expected_uuid2, hostname=expected_hostname2, manifestations={expected_dataset2.dataset_id: expected_manifestation2}, paths={expected_dataset2.dataset_id: FilePath('/bb')}, devices={})])
    expected_dict1 = dict(dataset_id=expected_dataset1.dataset_id, primary=unicode(expected_uuid1), path=u'/aa')
    expected_dict2 = dict(dataset_id=expected_dataset2.dataset_id, primary=unicode(expected_uuid2), path=u'/bb')
    response = [expected_dict1, expected_dict2]
    return self.assertResultItems('GET', '/state/datasets', None, OK, response)
