'``StartApplication.run()`` passes the appropriate volume arguments to
``DockerClient.add`` based on the application\'s volume.'

def test_volumes(self):

    DATASET_ID = unicode(uuid4())
    fake_docker = FakeDockerClient()
    deployer = ApplicationNodeDeployer(u'example.com', fake_docker)
    node_path = FilePath(('/flocker/' + DATASET_ID.encode('ascii')))
    mountpoint = FilePath('/mymount')
    application_name = u'site-example.com'
    application = Application(name=application_name, image=DockerImage(repository=u'clusterhq/postgresql', tag=u'9.3.5'), links=frozenset(), volume=AttachedVolume(manifestation=Manifestation(dataset=Dataset(dataset_id=DATASET_ID), primary=True), mountpoint=mountpoint))
    StartApplication(application=application, node_state=EMPTY_NODESTATE.set('paths', {DATASET_ID: node_path})).run(deployer, state_persister=InMemoryStatePersister())
    self.assertEqual(pset([DockerVolume(node_path=node_path, container_path=mountpoint)]), fake_docker._units[application_name].volumes)
