private static File copyToTempFile(File file) throws IOException {
        File tmpFile = File.createTempFile("credentials.", null);
        tmpFile.delete();
        FileUtils.copyFile(file, tmpFile);
        return tmpFile;
    }
Loads the given credentials file and checks that it contains the same
set of profiles as expected.
aws-java-sdk-core/src/test/java/com/amazonaws/auth/profile/ProfilesConfigFileWriterTest.java