private void getDigestWithoutSettingAlgorithmTest() throws RestServiceException {
    List<HttpContent> httpContents = new ArrayList<HttpContent>();
    generateContent(httpContents);
    Channel channel = new MockChannel();
    NettyRequest nettyRequest = createNettyRequest(HttpMethod.POST, "/", null, channel);
    ByteBufferAsyncWritableChannel writeChannel = new ByteBufferAsyncWritableChannel();
    ReadIntoCallback callback = new ReadIntoCallback();
    nettyRequest.readInto(writeChannel, callback);

    for (HttpContent httpContent : httpContents) {
      nettyRequest.addContent(httpContent);
    }
    assertNull("Digest should be null because no digest algorithm was set", nettyRequest.getDigest());
    closeRequestAndValidate(nettyRequest, channel);
  }
Tests for failure when {@link NettyRequest#getDigest()} is called without a call to
{@link NettyRequest#setDigestAlgorithm(String)}.
@throws RestServiceException
ambry-rest/src/test/java/com/github/ambry/rest/NettyRequestTest.java