@Test
  public void continueHeaderPostTest() throws Exception {
    notificationSystem.reset();
    Properties properties = new Properties();
    properties.put(NettyConfig.NETTY_ENABLE_ONE_HUNDRED_CONTINUE, "true");
    NettyConfig nettyConfig = new NettyConfig(new VerifiableProperties(properties));
    EmbeddedChannel channel = createChannel(nettyConfig);
    HttpHeaders headers = new DefaultHttpHeaders();
    headers.set(EXPECT, CONTINUE);
    HttpRequest httpRequest = RestTestUtils.createRequest(HttpMethod.POST, "/s3/", headers);
    httpRequest.headers().set(RestUtils.Headers.SERVICE_ID, "rawBytesPostTest");
    httpRequest.headers().set(RestUtils.Headers.AMBRY_CONTENT_TYPE, "application/octet-stream");
    channel.writeInbound(httpRequest);

    Random random = new Random();
    HttpResponse response = channel.readOutbound();
    assertEquals("Unexpected response status", HttpResponseStatus.CONTINUE, response.status());

    ByteBuffer content = ByteBuffer.wrap(TestUtils.getRandomBytes(random.nextInt(128) + 128));
    channel.writeInbound(new DefaultHttpContent(Unpooled.wrappedBuffer(content)));
    channel.writeInbound(LastHttpContent.EMPTY_LAST_CONTENT);

    if (!notificationSystem.operationCompleted.await(1000, TimeUnit.MILLISECONDS)) {
      fail("Post did not succeed after 1000ms. There is an error or timeout needs to increase");
    }
    ByteBuffer receivedContent = router.getActiveBlobs().get(notificationSystem.blobIdOperatedOn).getBlob();
    compareContent(receivedContent, Collections.singletonList(content));
  }
Test the case where Except == 100-continue.
@throws Exception
ambry-rest/src/test/java/com/github/ambry/rest/NettyMessageProcessorTest.java