private void sendRequestAndEvaluateResponsePerformance(HttpRequest httpRequest, String requestContent,
      HttpResponseStatus expectedStatus, boolean shouldBeSatisfied) throws IOException {
    EmbeddedChannel channel = createEmbeddedChannel();
    channel.pipeline().get(MockNettyMessageProcessor.class);
    channel.writeInbound(httpRequest);
    if (requestContent != null) {
      channel.writeInbound(createContent(requestContent, true));
    }
    HttpResponse response = channel.readOutbound();
    assertEquals("Unexpected response status", expectedStatus, response.status());
    if (requestContent != null) {
      HttpContent responseContent = channel.readOutbound();
      String returnedContent = RestTestUtils.getContentString(responseContent);
      responseContent.release();
      assertEquals("Content does not match with expected content", requestContent, returnedContent);
    }
    if (shouldBeSatisfied) {
      assertTrue(httpRequest.method() + " request should be satisfied", MockNettyRequest.mockTracker.isSatisfied());
    } else {
      assertFalse(httpRequest.method() + " request should be unsatisfied", MockNettyRequest.mockTracker.isSatisfied());
    }
  }
Send the curated request and verify that the response and satisfaction are expected.
@param httpRequest the request to be handled by {@link MockNettyMessageProcessor}
@param requestContent the content needed for POST request
@param expectedStatus the expected {@link HttpResponseStatus}
@param shouldBeSatisfied whether the request should be satisfied or not
@throws IOException
ambry-rest/src/test/java/com/github/ambry/rest/NettyResponseChannelTest.java