test_class.declarator: script = new ChangeScript(99, "Some Description")
test_class.modifier: private final
test_class.original_string: private final ChangeScript script = new ChangeScript(99, "Some Description");
test_class.type: ChangeScript
test_class.var_name: script
test_class.declarator: schemaVersionManager
test_class.modifier: private
test_class.original_string: private DatabaseSchemaVersionManager schemaVersionManager;
test_class.type: DatabaseSchemaVersionManager
test_class.var_name: schemaVersionManager
test_class.declarator: expectedResultSet
test_class.modifier: @Mock private
test_class.original_string: @Mock private ResultSet expectedResultSet;
test_class.type: ResultSet
test_class.var_name: expectedResultSet
test_class.declarator: queryExecuter
test_class.modifier: @Mock private
test_class.original_string: @Mock private QueryExecuter queryExecuter;
test_class.type: QueryExecuter
test_class.var_name: queryExecuter
test_class.declarator: timeProvider
test_class.modifier: @Mock private
test_class.original_string: @Mock private DatabaseSchemaVersionManager.CurrentTimeProvider timeProvider;
test_class.type: DatabaseSchemaVersionManager.CurrentTimeProvider
test_class.var_name: timeProvider
test_class.file: dbdeploy-core/src/test/java/com/dbdeploy/database/changelog/DatabaseSchemaVersionManagerTest.java
test_class.identifier: DatabaseSchemaVersionManagerTest
test_case.body: @Test
      public void shouldUseQueryExecuterToReadInformationFromTheChangelogTable() throws Exception {
          when(expectedResultSet.next()).thenReturn(true, true, true, false);
          when(expectedResultSet.getLong(1)).thenReturn(5L, 9L, 12L);
  
          final List<Long> numbers = schemaVersionManager.getAppliedChanges();
          assertThat(numbers, hasItems(5L, 9L, 12L));
      }
test_case.class_method_signature: DatabaseSchemaVersionManagerTest.shouldUseQueryExecuterToReadInformationFromTheChangelogTable()
test_case.full_signature: @Test public void shouldUseQueryExecuterToReadInformationFromTheChangelogTable()
test_case.identifier: shouldUseQueryExecuterToReadInformationFromTheChangelogTable
test_case.invocations: thenReturn when next thenReturn when getLong getAppliedChanges assertThat hasItems
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldUseQueryExecuterToReadInformationFromTheChangelogTable()
focal_class.declarator: queryExecuter
focal_class.modifier: private final
focal_class.original_string: private final QueryExecuter queryExecuter;
focal_class.type: QueryExecuter
focal_class.var_name: queryExecuter
focal_class.declarator: changeLogTableName
focal_class.modifier: private final
focal_class.original_string: private final String changeLogTableName;
focal_class.type: String
focal_class.var_name: changeLogTableName
focal_class.declarator: timeProvider = new CurrentTimeProvider()
focal_class.modifier: private
focal_class.original_string: private CurrentTimeProvider timeProvider = new CurrentTimeProvider();
focal_class.type: CurrentTimeProvider
focal_class.var_name: timeProvider
focal_class.file: dbdeploy-core/src/main/java/com/dbdeploy/database/changelog/DatabaseSchemaVersionManager.java
focal_class.identifier: DatabaseSchemaVersionManager
focal_class.interfaces: implements AppliedChangesProvider
focal_class.class_method_signature: DatabaseSchemaVersionManager.DatabaseSchemaVersionManager(QueryExecuter queryExecuter, String changeLogTableName)
focal_class.full_signature: public  DatabaseSchemaVersionManager(QueryExecuter queryExecuter, String changeLogTableName)
focal_class.identifier: DatabaseSchemaVersionManager
focal_class.modifiers: public
focal_class.parameters: (QueryExecuter queryExecuter, String changeLogTableName)
focal_class.signature:  DatabaseSchemaVersionManager(QueryExecuter queryExecuter, String changeLogTableName)
focal_class.class_method_signature: DatabaseSchemaVersionManager.getAppliedChanges()
focal_class.full_signature: public List<Long> getAppliedChanges()
focal_class.identifier: getAppliedChanges
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAppliedChanges()
focal_class.class_method_signature: DatabaseSchemaVersionManager.getChangelogDeleteSql(ChangeScript script)
focal_class.full_signature: public String getChangelogDeleteSql(ChangeScript script)
focal_class.identifier: getChangelogDeleteSql
focal_class.modifiers: public
focal_class.parameters: (ChangeScript script)
focal_class.return: String
focal_class.signature: String getChangelogDeleteSql(ChangeScript script)
focal_class.class_method_signature: DatabaseSchemaVersionManager.recordScriptApplied(ChangeScript script)
focal_class.full_signature: public void recordScriptApplied(ChangeScript script)
focal_class.identifier: recordScriptApplied
focal_class.modifiers: public
focal_class.parameters: (ChangeScript script)
focal_class.return: void
focal_class.signature: void recordScriptApplied(ChangeScript script)
focal_class.class_method_signature: DatabaseSchemaVersionManager.setTimeProvider(CurrentTimeProvider timeProvider)
focal_class.full_signature: public void setTimeProvider(CurrentTimeProvider timeProvider)
focal_class.identifier: setTimeProvider
focal_class.modifiers: public
focal_class.parameters: (CurrentTimeProvider timeProvider)
focal_class.return: void
focal_class.signature: void setTimeProvider(CurrentTimeProvider timeProvider)
focal_method.body: public List<Long> getAppliedChanges() {
  		try {
  			ResultSet rs = queryExecuter.executeQuery(
  					"SELECT change_number FROM " + changeLogTableName + "  ORDER BY change_number");
  
  			List<Long> changeNumbers = new ArrayList<Long>();
  
  			while (rs.next()) {
  				changeNumbers.add(rs.getLong(1));
  			}
  
  			rs.close();
  
  			return changeNumbers;
  		} catch (SQLException e) {
  			throw new SchemaVersionTrackingException("Could not retrieve change log from database because: "
  					+ e.getMessage(), e);
  		}
  	}
focal_method.class_method_signature: DatabaseSchemaVersionManager.getAppliedChanges()
focal_method.full_signature: public List<Long> getAppliedChanges()
focal_method.identifier: getAppliedChanges
focal_method.invocations: executeQuery next add getLong close getMessage
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: List<Long>
focal_method.signature: List<Long> getAppliedChanges()