'``ApplicationNodeDeployer.calculate_changes`` does not specify
that an application must be started or stopped if the desired
configuration is the same as the current configuration.'

def test_no_change_needed(self):

    api = ApplicationNodeDeployer(u'node.example.com', docker_client=FakeDockerClient())
    application = Application(name=u'mysql-hybridcluster', image=DockerImage(repository=u'clusterhq/mysql', tag=u'latest'), ports=frozenset())
    nodes = frozenset([Node(hostname=u'node.example.com', applications=frozenset([application]))])
    desired = Deployment(nodes=nodes)
    node_state = NodeState(hostname=api.hostname, applications=[application])
    result = api.calculate_changes(desired_configuration=desired, current_cluster_state=DeploymentState(nodes=[node_state]), local_state=NodeLocalState(node_state=node_state))
    expected = no_change()
    self.assertEqual(expected, result)
