test_class.declarator: availableChangeScriptsProvider
test_class.modifier: @Mock private
test_class.original_string: @Mock private AvailableChangeScriptsProvider availableChangeScriptsProvider;
test_class.type: AvailableChangeScriptsProvider
test_class.var_name: availableChangeScriptsProvider
test_class.declarator: appliedChangesProvider
test_class.modifier: @Mock private
test_class.original_string: @Mock private AppliedChangesProvider appliedChangesProvider;
test_class.type: AppliedChangesProvider
test_class.var_name: appliedChangesProvider
test_class.declarator: controller
test_class.modifier: private
test_class.original_string: private Controller controller;
test_class.type: Controller
test_class.var_name: controller
test_class.declarator: change1
test_class.modifier: private
test_class.original_string: private ChangeScript change1;
test_class.type: ChangeScript
test_class.var_name: change1
test_class.declarator: change2
test_class.modifier: private
test_class.original_string: private ChangeScript change2;
test_class.type: ChangeScript
test_class.var_name: change2
test_class.declarator: change3
test_class.modifier: private
test_class.original_string: private ChangeScript change3;
test_class.type: ChangeScript
test_class.var_name: change3
test_class.declarator: applier = new StubChangeScriptApplier()
test_class.modifier: private
test_class.original_string: private StubChangeScriptApplier applier = new StubChangeScriptApplier();
test_class.type: StubChangeScriptApplier
test_class.var_name: applier
test_class.declarator: undoApplier = new StubChangeScriptApplier()
test_class.modifier: private
test_class.original_string: private StubChangeScriptApplier undoApplier = new StubChangeScriptApplier();
test_class.type: StubChangeScriptApplier
test_class.var_name: undoApplier
test_class.file: dbdeploy-core/src/test/java/com/dbdeploy/ControllerTest.java
test_class.identifier: ControllerTest
test_case.body: @Test
  	public void shouldIgnoreChangesAlreadyAppliedToTheDatabase() throws Exception {
  		when(appliedChangesProvider.getAppliedChanges()).thenReturn(Arrays.asList(1L));
  
  		controller.processChangeScripts(Long.MAX_VALUE);
  
          assertThat(applier.changeScripts.size(), is(2));
  		assertThat(applier.changeScripts.get(0), is(change2));
  		assertThat(applier.changeScripts.get(1), is(change3));
  	}
test_case.class_method_signature: ControllerTest.shouldIgnoreChangesAlreadyAppliedToTheDatabase()
test_case.full_signature: @Test public void shouldIgnoreChangesAlreadyAppliedToTheDatabase()
test_case.identifier: shouldIgnoreChangesAlreadyAppliedToTheDatabase
test_case.invocations: thenReturn when getAppliedChanges asList processChangeScripts assertThat size is assertThat get is assertThat get is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldIgnoreChangesAlreadyAppliedToTheDatabase()
focal_class.declarator: availableChangeScriptsProvider
focal_class.modifier: private final
focal_class.original_string: private final AvailableChangeScriptsProvider availableChangeScriptsProvider;
focal_class.type: AvailableChangeScriptsProvider
focal_class.var_name: availableChangeScriptsProvider
focal_class.declarator: appliedChangesProvider
focal_class.modifier: private final
focal_class.original_string: private final AppliedChangesProvider appliedChangesProvider;
focal_class.type: AppliedChangesProvider
focal_class.var_name: appliedChangesProvider
focal_class.declarator: changeScriptApplier
focal_class.modifier: private final
focal_class.original_string: private final ChangeScriptApplier changeScriptApplier;
focal_class.type: ChangeScriptApplier
focal_class.var_name: changeScriptApplier
focal_class.declarator: undoScriptApplier
focal_class.modifier: private final
focal_class.original_string: private final ChangeScriptApplier undoScriptApplier;
focal_class.type: ChangeScriptApplier
focal_class.var_name: undoScriptApplier
focal_class.declarator: prettyPrinter = new PrettyPrinter()
focal_class.modifier: private final
focal_class.original_string: private final PrettyPrinter prettyPrinter = new PrettyPrinter();
focal_class.type: PrettyPrinter
focal_class.var_name: prettyPrinter
focal_class.file: dbdeploy-core/src/main/java/com/dbdeploy/Controller.java
focal_class.identifier: Controller
focal_class.class_method_signature: Controller.Controller(AvailableChangeScriptsProvider availableChangeScriptsProvider,
  					  AppliedChangesProvider appliedChangesProvider,
  					  ChangeScriptApplier changeScriptApplier, ChangeScriptApplier undoScriptApplier)
focal_class.full_signature: public  Controller(AvailableChangeScriptsProvider availableChangeScriptsProvider,
  					  AppliedChangesProvider appliedChangesProvider,
  					  ChangeScriptApplier changeScriptApplier, ChangeScriptApplier undoScriptApplier)
focal_class.identifier: Controller
focal_class.modifiers: public
focal_class.parameters: (AvailableChangeScriptsProvider availableChangeScriptsProvider,
  					  AppliedChangesProvider appliedChangesProvider,
  					  ChangeScriptApplier changeScriptApplier, ChangeScriptApplier undoScriptApplier)
focal_class.signature:  Controller(AvailableChangeScriptsProvider availableChangeScriptsProvider,
  					  AppliedChangesProvider appliedChangesProvider,
  					  ChangeScriptApplier changeScriptApplier, ChangeScriptApplier undoScriptApplier)
focal_class.class_method_signature: Controller.processChangeScripts(Long lastChangeToApply)
focal_class.full_signature: public void processChangeScripts(Long lastChangeToApply)
focal_class.identifier: processChangeScripts
focal_class.modifiers: public
focal_class.parameters: (Long lastChangeToApply)
focal_class.return: void
focal_class.signature: void processChangeScripts(Long lastChangeToApply)
focal_class.class_method_signature: Controller.logStatus(List<ChangeScript> scripts, List<Long> applied, List<ChangeScript> toApply)
focal_class.full_signature: private void logStatus(List<ChangeScript> scripts, List<Long> applied, List<ChangeScript> toApply)
focal_class.identifier: logStatus
focal_class.modifiers: private
focal_class.parameters: (List<ChangeScript> scripts, List<Long> applied, List<ChangeScript> toApply)
focal_class.return: void
focal_class.signature: void logStatus(List<ChangeScript> scripts, List<Long> applied, List<ChangeScript> toApply)
focal_class.class_method_signature: Controller.identifyChangesToApply(Long lastChangeToApply, List<ChangeScript> scripts, List<Long> applied)
focal_class.full_signature: private List<ChangeScript> identifyChangesToApply(Long lastChangeToApply, List<ChangeScript> scripts, List<Long> applied)
focal_class.identifier: identifyChangesToApply
focal_class.modifiers: private
focal_class.parameters: (Long lastChangeToApply, List<ChangeScript> scripts, List<Long> applied)
focal_class.return: List<ChangeScript>
focal_class.signature: List<ChangeScript> identifyChangesToApply(Long lastChangeToApply, List<ChangeScript> scripts, List<Long> applied)
focal_class.class_method_signature: Controller.info(String string)
focal_class.full_signature: private void info(String string)
focal_class.identifier: info
focal_class.modifiers: private
focal_class.parameters: (String string)
focal_class.return: void
focal_class.signature: void info(String string)
focal_method.body: public void processChangeScripts(Long lastChangeToApply) throws DbDeployException, IOException {
  		if (lastChangeToApply != Long.MAX_VALUE) {
  			info("Only applying changes up and including change script #" + lastChangeToApply);
  		}
  
  		List<ChangeScript> scripts = availableChangeScriptsProvider.getAvailableChangeScripts();
  		List<Long> applied = appliedChangesProvider.getAppliedChanges();
  		List<ChangeScript> toApply = identifyChangesToApply(lastChangeToApply, scripts, applied);
  
  		logStatus(scripts, applied, toApply);
  
          changeScriptApplier.apply(Collections.unmodifiableList(toApply));
  
          if (undoScriptApplier != null) {
  			info("Generating undo scripts...");
  			Collections.reverse(toApply);
              undoScriptApplier.apply(Collections.unmodifiableList(toApply));
          }
  	}
focal_method.class_method_signature: Controller.processChangeScripts(Long lastChangeToApply)
focal_method.full_signature: public void processChangeScripts(Long lastChangeToApply)
focal_method.identifier: processChangeScripts
focal_method.invocations: info getAvailableChangeScripts getAppliedChanges identifyChangesToApply logStatus apply unmodifiableList info reverse apply unmodifiableList
focal_method.modifiers: public
focal_method.parameters: (Long lastChangeToApply)
focal_method.return: void
focal_method.signature: void processChangeScripts(Long lastChangeToApply)