'If an ``Application`` is configured with a volume but exists with a
different volume, a change to restart that application is calculated.'

def test_different_volume_needs_change(self):

    application = APPLICATION_WITH_VOLUME_SIZE
    manifestation = application.volume.manifestation
    another_manifestation = manifestation.transform(['dataset', 'dataset_id'], uuid4())
    changed_application = application.transform(['volume', 'manifestation'], another_manifestation)
    local_state = EMPTY_NODESTATE.set(devices={UUID(manifestation.dataset_id): FilePath('/dev/foo'), UUID(another_manifestation.dataset_id): FilePath('/dev/bar')}, paths={manifestation.dataset_id: FilePath('/foo/bar'), another_manifestation.dataset_id: FilePath('/bar/baz')}, manifestations={manifestation.dataset_id: manifestation, another_manifestation.dataset_id: another_manifestation}, applications=[application])
    local_config = to_node(local_state).set(applications=[changed_application])
    assert_application_calculated_changes(self, local_state, local_config, set(), restart(application, changed_application, local_state))
