public static void assertStringEqualsStream(String expected, InputStream actual) {
        try {
            InputStream expectedInputStream = new ByteArrayInputStream(expected.getBytes());
            assertTrue(doesStreamEqualStream(expectedInputStream, actual));
        } catch (IOException e) {
            fail("Error reading from stream: " + e.getMessage());
        }
    }
Asserts that the contents in the specified string are exactly equal to the contents read from
the specified input stream. The input stream 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 string's
contents, then this method will fail the current test.

@param expected
           The string containing the expected data.
@param actual
           The stream that will be read, compared to the expected string data, and finally
           closed.
aws-java-sdk-test-utils/src/main/java/com/amazonaws/test/util/SdkAsserts.java