'``NodeState.update_cluster_state`` returns a new ``DeploymentState``
with the state of the ``NodeState`` with the matching ``hostname``
replaced with its own state.'

def test_update_cluster_state(self):

    hostname = u'1.2.3.4'
    apps = {APP1.name: APP1}
    manifestations = {MANIFESTATION.dataset_id: MANIFESTATION}
    node = NodeState(hostname=hostname, applications=None, manifestations=None)
    app_state = node.set(applications=apps)
    data_state = node.set(manifestations=manifestations, devices={}, paths={})
    cluster = DeploymentState(nodes={app_state})
    changed_cluster = data_state.update_cluster_state(cluster)
    self.assertEqual(DeploymentState(nodes={NodeState(hostname=hostname, applications=apps, manifestations=manifestations, devices={}, paths={})}), changed_cluster)
