'``StartApplication`` accepts an application object and when ``run()``
is called returns a ``Deferred`` which fires when the docker container
has been added and started.'

def test_start(self):

    fake_docker = FakeDockerClient()
    api = ApplicationNodeDeployer(u'example.com', docker_client=fake_docker)
    docker_image = DockerImage(repository=u'clusterhq/flocker', tag=u'release-14.0')
    ports = frozenset([Port(internal_port=80, external_port=8080)])
    application = Application(name=u'site-example.com', image=docker_image, ports=ports, links=frozenset())
    start_result = StartApplication(application=application, node_state=EMPTY_NODESTATE).run(api, state_persister=InMemoryStatePersister())
    exists_result = fake_docker.exists(unit_name=application.name)
    port_maps = pset([PortMap(internal_port=80, external_port=8080)])
    self.assertEqual((None, True, docker_image.full_name, port_maps), (self.successResultOf(start_result), self.successResultOf(exists_result), fake_docker._units[application.name].container_image, fake_docker._units[application.name].ports))
