'Utility method to create one or more containers via the API and
compare the result to an expected deployment.
:param list request_data: A ``list`` of ``dict`` instances representing
the JSON data for one or more API requests.
:param list node_data: A ``set`` of ``Node`` instances that
are expected to be deployed.
:return: A ``Deferred`` that fires with an assertion on the deployment
result.
request_data, applications'

def _test_create_container(self, request_data, node_data):

    saving = self.persistence_service.save(Deployment(nodes={Node(uuid=self.NODE_A_UUID), Node(uuid=self.NODE_B_UUID)}))
    for request in request_data:
        saving.addCallback((lambda _, req=request: self.assertResponseCode('POST', '/configuration/containers', req, CREATED)))
    def created(_):
        deployment = self.persistence_service.get()
        expected = Deployment(nodes=node_data)
        self.assertEqual(deployment, expected)
    saving.addCallback(created)
    return saving
