'Metadata included with the creation of a dataset is included in the
persisted configuration and response body.'

def test_create_with_metadata(self):

    dataset_id = unicode(uuid4())
    metadata = {u'foo': u'bar', u'baz': u'quux'}
    dataset = {u'primary': self.NODE_A, u'dataset_id': dataset_id, u'metadata': metadata}
    expected = dataset.copy()
    expected[u'deleted'] = False
    creating = self.assertResult('POST', '/configuration/datasets', dataset, CREATED, expected)
    def created(ignored):
        deployment = self.persistence_service.get()
        self.assertEqual(Deployment(nodes=frozenset({Node(uuid=self.NODE_A_UUID, manifestations={dataset_id: Manifestation(dataset=Dataset(dataset_id=dataset_id, metadata=pmap(metadata)), primary=True)})})), deployment)
    creating.addCallback(created)
    return creating
