public static void assertFileByHash( @NotNull @NonNls String path, @NotNull Iterable<? extends Hash> expectedHashes, @NotNull File fileUnderTest ) throws IOException {
Collection<Hash> actualHashes = new ArrayList<Hash>();
for ( Hash expected : expectedHashes ) {
Hash actual = HashCalculator.calculate( expected.getAlgorithm(), fileUnderTest );
actualHashes.add( actual );
if ( expected.equals( actual ) ) {
return; //everything went fine
}
}