@@ -0,0 +1,2561 @@
+/**%0A * Copyright Notice%0A *%0A * This is a work of the U.S. Government and is not subject to copyright%0A * protection in the United States. Foreign copyrights may apply.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage gov.va.isaac.ie;%0A%0Aimport gov.va.isaac.AppContext;%0Aimport gov.va.isaac.models.util.ExporterBase;%0A%0Aimport java.io.File;%0Aimport java.lang.reflect.Field;%0A%0Aimport org.ihtsdo.otf.tcc.datastore.BdbTerminologyStore;%0Aimport org.ihtsdo.otf.tcc.lookup.Hk2Looker;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.slf4j.bridge.SLF4JBridgeHandler;%0A%0A/**%0A * Utility class for bootstrapping a test.%0A *%0A * @author bcarlsenca%0A */%0Apublic class SampleTest extends ExporterBase %7B%0A%0A  /**  The Constant LOG. */%0A  private static final Logger LOG = LoggerFactory.getLogger(SampleTest.class);%0A%0A  /**%0A   * Instantiates an empty %7B@link SampleTest%7D.%0A   *%0A   * @throws Exception the exception%0A   */%0A  private SampleTest() throws Exception %7B%0A    super();%0A  %7D%0A%0A  /* (non-Javadoc)%0A   * @see gov.va.isaac.models.util.ExporterBase#getLogger()%0A   */%0A  @Override%0A  protected Logger getLogger() %7B%0A    return LOG;%0A  %7D%0A%0A  /**%0A   * Shutdown.%0A   */%0A  public void shutdown() %7B%0A    getDataStore().shutdown();%0A  %7D%0A%0A  /**%0A   * Application entry point.%0A   *%0A   * @param args the command line arguments%0A   * @throws Exception the exception%0A   */%0A  public static void main(String%5B%5D args) throws Exception %7B%0A%0A    // Set up like ISAAC App.%0A    SLF4JBridgeHandler.removeHandlersForRootLogger();%0A    SLF4JBridgeHandler.install();%0A    AppContext.setup();%0A    // TODO OTF fix: this needs to be fixed so I don't have to hack it with%0A    // reflection....(https://jira.ihtsdotools.org/browse/OTFISSUE-11)%0A    Field f = Hk2Looker.class.getDeclaredField(%22looker%22);%0A    f.setAccessible(true);%0A    f.set(null, AppContext.getServiceLocator());%0A    System.setProperty(BdbTerminologyStore.BDB_LOCATION_PROPERTY, new File(%0A        %22../isaac-app/berkeley-db%22).getAbsolutePath());%0A%0A    // FHIM Models RS.%0A    SampleTest tester = new SampleTest();%0A%0A    tester.shutdown();%0A  %7D%0A%0A%7D%0A

add test class, part of cleanup.