public static void assertStreamEqualsStream(String errmsg,
                                                InputStream expectedInputStream,
                                                InputStream inputStream) {
        try {
            assertTrue(errmsg, doesStreamEqualStream(expectedInputStream, inputStream));
        } catch (IOException e) {
            fail("Error reading from stream: " + e.getMessage());
        }
    }
Asserts that the contents in the specified input streams are same. The input streams will be
closed at the end of this method. If any problems are encountered, or the stream's contents
don't match up exactly with the file's contents, then this method will fail the current test.

@param errmsg
           error message to be thrown when the assertion fails.
@param expected
           expected input stream. The stream will be closed at the end.
@param actual
           The stream that will be read, compared to the expected file contents, and finally
           closed.
aws-java-sdk-test-utils/src/main/java/com/amazonaws/test/util/SdkAsserts.java