// Reset the System properties to initial values.
System.setProperties(initialProperties);
}
private void ingestTestFile() {
Metadata prodMet = null;
StdIngester ingester = new StdIngester(transferServiceFacClass);
try {
URL ingestUrl = this.getClass().getResource("/ingest");
URL refUrl = this.getClass().getResource("/ingest/test.txt");
URL metUrl = this.getClass().getResource("/ingest/test.txt.met");
prodMet = new SerializableMetadata(new FileInputStream(
new File(metUrl.getFile())));
// now add the right file location
prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
ingestUrl.getFile()).getCanonicalPath());
ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(
refUrl.getFile()), prodMet);
} catch (Exception e) {
fail(e.getMessage());