@Test
    public void testRenameProfile() throws IOException {
        File tmpFile = File.createTempFile("credentials.", null);

        Profile[] abcd = {
                new Profile("a", basicCredA),
                new Profile("b", basicCredB),
                new Profile("c", sessionCredC),
                new Profile("d", sessionCredD)
                };
        ProfilesConfigFileWriter.dumpToFile(tmpFile, true, abcd);

        // Rename a to A
        Profile[] modified = {
                new Profile("A", basicCredA),
                new Profile("b", basicCredB),
                new Profile("c", sessionCredC),
                new Profile("d", sessionCredD)
                };
        ProfilesConfigFileWriter.modifyOneProfile(tmpFile, "a", new Profile("A", basicCredA));
        checkCredentialsFile(tmpFile, modified);
    }
Tests that properties, including account ID, are preserved after profile modification.
@throws URISyntaxException
aws-java-sdk-core/src/test/java/com/amazonaws/auth/profile/ProfilesConfigFileWriterTest.java