'If an ``Application`` is configured with a volume but exists without
the volume and the dataset for the volume is present on the node, a
change to restart that application is calculated.'

def test_has_volume_needs_changes(self):

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