@@ -0,0 +1,1398 @@
+package org.pmiops.workbench.db;%0A%0Aimport static org.junit.Assert.fail;%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0Aimport javax.xml.parsers.DocumentBuilderFactory;%0Aimport org.junit.Test;%0Aimport org.w3c.dom.Document;%0Aimport org.w3c.dom.Element;%0Aimport org.w3c.dom.NodeList;%0A%0Apublic class LiquibaseTest %7B%0A%0A  List%3CString%3E whitelist = Arrays.asList(%22db.changelog-master.xml%22);%0A%0A  @Test%0A  public void allChangeLogFilesAreIndexed() throws Exception %7B%0A    List%3CString%3E indexedChangeLogs = getIndexedChangeLogs();%0A    for (File f : new File(%22db/changelog%22).listFiles()) %7B%0A      if (!whitelist.contains(f.getName()) && !indexedChangeLogs.contains(f.getName())) %7B%0A        fail(f.getName() + %22 is in the db/changelog directory but not in db.changelog-master.xml%22);%0A      %7D%0A    %7D%0A  %7D%0A%0A  private List%3CString%3E getIndexedChangeLogs() throws Exception %7B%0A    Document doc =%0A        DocumentBuilderFactory.newInstance()%0A            .newDocumentBuilder()%0A            .parse(new File(%22db/changelog/db.changelog-master.xml%22));%0A%0A    NodeList changeLogs = doc.getElementsByTagName(%22include%22);%0A%0A    List%3CString%3E changeLogFilenames = new ArrayList%3C%3E();%0A    for (int i = 0; i %3C changeLogs.getLength(); i++) %7B%0A      changeLogFilenames.add(%0A          ((Element) changeLogs.item(i)).getAttribute(%22file%22).split(%22changelog/%22)%5B1%5D);%0A    %7D%0A%0A    return changeLogFilenames;%0A  %7D%0A%7D%0A

Add test that verifies all liquibase files are indexed for migration (#2815)