def METHOD_NAME(self, stats_before, resp, error_code, buffers=4, results=2):
    self.assertEqual(resp.status_code, 200)
    job_result = resp.json()["jobs-result"]
    for i in range(results):
        self.assertEqual(job_result[i]["error_code"], error_code)
    self.kphp_server.assert_stats(
        initial_stats=stats_before,
        expected_added_stats={
            "kphp_server.workers_job_memory_messages_shared_messages_buffers_acquired": buffers,
            "kphp_server.workers_job_memory_messages_shared_messages_buffers_released": buffers,
            "kphp_server.workers_job_memory_messages_shared_messages_buffer_acquire_fails": 0
        })