'Verify that when the control service has ``deployment``
persisted as its configuration, the response from the
configuration listing endpoint includes the items in
``expected``.
:param Deployment deployment: The deployment configuration to
use.
:param list expected: The objects expected to be returned by
the endpoint, disregarding order.
:return: A ``Deferred`` that fires successfully if the
expected results are received or which fires with a
failure if there is a problem.'

def _containers_test(self, deployment, expected):

    saving = self.persistence_service.save(deployment)
    def saved(ignored):
        return self.assertResultItems('GET', '/configuration/containers', None, OK, expected)
    saving.addCallback(saved)
    return saving
