@Test
public void globalStateMustBeCleared() {

    URL url = TestURLBuilder.forContent("var globalVar = 0;" +
            script("input.cpt = globalVar; globalVar++;")).build();
    DefaultDockerImageMigrationHandler migrationHandler = new DefaultDockerImageMigrationHandler(url);
    Node result = migrationHandler.performMigration(TEST_NODE);
    assertThat(result).isEqualTo(TEST_NODE.editNode().put("cpt", 0));
    result = migrationHandler.performMigration(TEST_NODE);
    assertThat(result).isEqualTo(TEST_NODE.editNode().put("cpt", 0));
}