'If a volume has a ``dataset_id`` attribute then it is set on the
created ``Dataset`` object.'

def test_volume_dataset_id(self):

    dataset_id = unicode(uuid4())
    config = dict(version=1, applications={u'mysql-hybridcluster': {u'image': u'clusterhq/mysql:v1.0.0', u'volume': {u'mountpoint': u'/var/lib/mysql', u'dataset_id': dataset_id}}})
    parser = FlockerConfiguration(config)
    volume_config = config[u'applications'][u'mysql-hybridcluster'][u'volume']
    volume = parser._parse_volume(volume_config, u'mysql-hybridcluster')
    self.assertEqual(volume.dataset.dataset_id, dataset_id)
