public static void assertFileEqualsStream(String errmsg, File expected, InputStream actual) {
        try {
            InputStream expectedInputStream = new FileInputStream(expected);
            assertStreamEqualsStream(errmsg, expectedInputStream, actual);
        } catch (FileNotFoundException e) {
            fail("Expected file " + expected.getAbsolutePath() + " doesn't exist: " + e.getMessage());
        }
    }
Asserts that the contents in the specified file 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 file's
contents, then this method will fail the current test.

@param errmsg
           error message to be thrown when the assertion fails.
@param expected
           The file containing the expected contents.
@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