'Assert a particular JSON response for the given API request.
:param bytes method: HTTP method to request.
:param bytes path: HTTP path.
:param unicode request_body: Body of HTTP request.
:param int expected_code: The code expected in the response.
response.
:param list|dict expected_result: The body expected in the response.
:param additional_headers: A mapping, additional HTTP headers to send.
:return: A ``Deferred`` that fires when test is done.'

def assertResult(self, method, path, request_body, expected_code, expected_result, additional_headers=pmap()):

    requesting = self.assertResponseCode(method, path, request_body, expected_code, additional_headers)
    requesting.addCallback(readBody)
    requesting.addCallback(loads)
    def assertEqualAndReturn(expected, actual):
        '\n                                                Assert    that    ``expected``    is    equal    to    ``actual``    and    return\n                                                ``actual``    for    further    processing.\n                                                '
        self.assertEqual(expected, actual)
        return actual
    requesting.addCallback((lambda actual_result: assertEqualAndReturn(expected_result, actual_result)))
    return requesting
