private boolean areStreamsEqual(InputStream stream1, InputStream stream2) throws IOException {
    if (stream1 == stream2) {
      return true;
    }
    if (stream1 == null || stream2 == null) {
      return false;
    }

    int byte1, byte2;
    while ((byte1 = stream1.read()) != -1) {
      byte2 = stream2.read();
      if (byte1 != byte2) {
        return false;
      }
    }
    return stream2.read() == -1;
  }
Test the {@link StoreFileChunk#from} method.
@throws IOException
ambry-protocol/src/test/java/com/github/ambry/protocol/RequestResponseTest.java