test_class.declarator: scriptCollector
test_class.modifier: private
test_class.original_string: private ScriptCollector scriptCollector;
test_class.type: ScriptCollector
test_class.var_name: scriptCollector
test_class.file: cassandra-migration/src/test/java/org/cognitor/cassandra/migration/collector/FailOnDuplicatesCollectorTest.java
test_class.identifier: FailOnDuplicatesCollectorTest
test_case.body: @Test(expected = MigrationException.class)
      public void shouldThrowExceptionWhenDuplicateScriptFileVersionsGiven() {
          scriptCollector.collect(new ScriptFile(0, "/0_init.cql", "init.cql"));
          scriptCollector.collect(new ScriptFile(0, "/0_another-init.cql", "another-init.cql"));
      }
test_case.class_method_signature: FailOnDuplicatesCollectorTest.shouldThrowExceptionWhenDuplicateScriptFileVersionsGiven()
test_case.full_signature: @Test(expected = MigrationException.class) public void shouldThrowExceptionWhenDuplicateScriptFileVersionsGiven()
test_case.identifier: shouldThrowExceptionWhenDuplicateScriptFileVersionsGiven
test_case.invocations: collect collect
test_case.modifiers: @Test(expected = MigrationException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldThrowExceptionWhenDuplicateScriptFileVersionsGiven()
focal_class.declarator: scripts = new ArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<ScriptFile> scripts = new ArrayList<>();
focal_class.type: List<ScriptFile>
focal_class.var_name: scripts
focal_class.declarator: versions = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final Set<Integer> versions = new HashSet<>();
focal_class.type: Set<Integer>
focal_class.var_name: versions
focal_class.file: cassandra-migration/src/main/java/org/cognitor/cassandra/migration/collector/FailOnDuplicatesCollector.java
focal_class.identifier: FailOnDuplicatesCollector
focal_class.interfaces: implements ScriptCollector
focal_class.class_method_signature: FailOnDuplicatesCollector.collect(ScriptFile scriptFile)
focal_class.full_signature: @Override public void collect(ScriptFile scriptFile)
focal_class.identifier: collect
focal_class.modifiers: @Override public
focal_class.parameters: (ScriptFile scriptFile)
focal_class.return: void
focal_class.signature: void collect(ScriptFile scriptFile)
focal_class.class_method_signature: FailOnDuplicatesCollector.getScriptFiles()
focal_class.full_signature: @Override public Collection<ScriptFile> getScriptFiles()
focal_class.identifier: getScriptFiles
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<ScriptFile>
focal_class.signature: Collection<ScriptFile> getScriptFiles()
focal_method.body: @Override
      public void collect(ScriptFile scriptFile) {
          if (!versions.contains(scriptFile.getVersion())) {
              scripts.add(scriptFile);
              versions.add(scriptFile.getVersion());
          } else {
              throw new MigrationException(
                      format("Found two different files for version %d", scriptFile.getVersion()),
                      scriptFile.getScriptName());
          }
      }
focal_method.class_method_signature: FailOnDuplicatesCollector.collect(ScriptFile scriptFile)
focal_method.full_signature: @Override public void collect(ScriptFile scriptFile)
focal_method.identifier: collect
focal_method.invocations: contains getVersion add add getVersion format getVersion getScriptName
focal_method.modifiers: @Override public
focal_method.parameters: (ScriptFile scriptFile)
focal_method.return: void
focal_method.signature: void collect(ScriptFile scriptFile)