You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@any23.apache.org by le...@apache.org on 2017/07/26 20:42:05 UTC

[1/8] any23 git commit: Ref ANY23-310

Repository: any23
Updated Branches:
  refs/heads/master 62e040b9a -> 5a486b29f


Ref ANY23-310

- created unit test

Signed-off-by: Jacek Grzebyta <gr...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/1b68735f
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/1b68735f
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/1b68735f

Branch: refs/heads/master
Commit: 1b68735f918361182aa5e30f08fd5f221ef0dda9
Parents: b0baa94
Author: Jacek Grzebyta <gr...@gmail.com>
Authored: Thu Jul 13 19:08:56 2017 +0100
Committer: Jacek Grzebyta <gr...@gmail.com>
Committed: Thu Jul 13 19:25:18 2017 +0100

----------------------------------------------------------------------
 .../org/apache/any23/cli/SimpleRoverTest.java   | 97 ++++++++++++++++++++
 cli/src/test/resources/log4j.properties         |  1 +
 2 files changed, 98 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/1b68735f/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java
----------------------------------------------------------------------
diff --git a/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java b/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java
new file mode 100644
index 0000000..76cd5cf
--- /dev/null
+++ b/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2017 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.any23.cli;
+
+import com.google.common.io.Files;
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collection;
+import org.apache.any23.util.FileUtils;
+import org.apache.pdfbox.util.Charsets;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Unit test for issue ANY23-310
+ *
+ * @author Jacek Grzebyta (grzebyta.dev [at] gmail.com)
+ */
+@RunWith(Parameterized.class)
+public class SimpleRoverTest extends ToolTestBase {
+    
+    private static final String baseUri = "urn:test";
+    private static final Logger log = LoggerFactory.getLogger(SimpleRoverTest.class);
+    
+    private String filePath;
+    
+    @Parameterized.Parameters
+    public static Collection<String[]> litsFiles() throws Exception {
+        return Arrays.asList(new String[][] {
+            {"/org/apache/any23/extractor/yaml/simple-load.yml"},
+            {"/org/apache/any23/extractor/csv/test-comma.csv"}
+        });
+    }
+    
+
+    public SimpleRoverTest(String filePath) {
+        super(Rover.class);
+        this.filePath = filePath;
+    }
+
+    /**
+     * Ref {@link https://issues.apache.org/jira/browse/ANY23-310} unit test.
+     * @throws Exception 
+     */
+    @Test
+    public void ref310Test()
+            throws Exception {
+        File outputFile = File.createTempFile("rover-test", ".ttl", tempDirectory);
+        File logfile = File.createTempFile("test-log", ".txt", tempDirectory);
+
+        int exitCode = runTool(String.format("-l %s -o %s -f turtle -e yaml,csv -d %s %s",
+                logfile.getAbsolutePath(),
+                outputFile.getAbsolutePath(),
+                baseUri,
+                copyResourceToTempFile(filePath).getAbsolutePath()));
+        
+        Assert.assertTrue(logfile.exists());
+        Assert.assertTrue(outputFile.exists());
+        // check if output file is longer than 10 chracters
+        String outputFileContent = FileUtils.readFileContent(outputFile);
+        Assert.assertTrue(outputFileContent.length() > 10);
+        
+        String[] logFileContent = FileUtils.readFileLines(logfile);
+        Assert.assertTrue(logFileContent.length == 2);
+        //Assert.assertTrue(logFileContent[1].split("\\W*")[1] == );
+        int contentSize = Integer.valueOf(logFileContent[1].split("\\t")[1]);
+        log.info("Content: '{}'", contentSize);
+        String extractors = logFileContent[1].split("\\t")[4].replaceAll("[\\[\\]\\s:\\d]", "");
+        log.info("Extractors: '{}'", extractors);
+        
+        
+        log.debug("Log file location: {}", logfile.getAbsolutePath());
+        log.trace("Log file content: \n{}\n", Files.toString(logfile, Charsets.UTF_8));
+
+        Assert.assertTrue("Content size should be greated than 0", contentSize > 0);
+        Assert.assertFalse(extractors.isEmpty());
+        Assert.assertEquals("Unexpected exit code.", 0, exitCode);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/any23/blob/1b68735f/cli/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/cli/src/test/resources/log4j.properties b/cli/src/test/resources/log4j.properties
index f286f6a..b6af94e 100644
--- a/cli/src/test/resources/log4j.properties
+++ b/cli/src/test/resources/log4j.properties
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 log4j.logger.org.apache.any23.cli.YAMLRoverTest=trace
+log4j.logger.org.apache.any23.cli.SimpleRoverTest=debug
 
 log4j.rootLogger=INFO, A1
 


[6/8] any23 git commit: Merge branch 'ANY23-310' of https://github.com/jgrzebyta/any23 into ANY23-310

Posted by le...@apache.org.
Merge branch 'ANY23-310' of https://github.com/jgrzebyta/any23 into ANY23-310


Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/75e11aab
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/75e11aab
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/75e11aab

Branch: refs/heads/master
Commit: 75e11aabbdfefe327113fdbfb7bf0953791f873b
Parents: 62e040b 38c8028
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Mon Jul 24 15:21:32 2017 -0700
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Mon Jul 24 15:21:32 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/any23/cli/Rover.java   |  4 +-
 .../org/apache/any23/cli/SimpleRoverTest.java   | 97 ++++++++++++++++++++
 cli/src/test/resources/log4j.properties         |  2 +-
 .../any23/writer/CompositeTripleHandler.java    |  4 +-
 .../any23/writer/LoggingTripleHandler.java      | 31 ++++---
 5 files changed, 121 insertions(+), 17 deletions(-)
----------------------------------------------------------------------



[5/8] any23 git commit: Fixed error message in Rover: No suitable extractors found for source

Posted by le...@apache.org.
Fixed error message in Rover: No suitable extractors found for source 


Signed-off-by:Jacek Grzebyta <gr...@gmail.com>

Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/38c80285
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/38c80285
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/38c80285

Branch: refs/heads/master
Commit: 38c802857aaffdf6d7b58be291419ba9ec1d59fc
Parents: b3f51f5
Author: Jacek Grzebyta <gr...@gmail.com>
Authored: Wed Jul 19 16:29:02 2017 +0100
Committer: Jacek Grzebyta <gr...@gmail.com>
Committed: Wed Jul 19 16:29:02 2017 +0100

----------------------------------------------------------------------
 cli/src/main/java/org/apache/any23/cli/Rover.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/38c80285/cli/src/main/java/org/apache/any23/cli/Rover.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/any23/cli/Rover.java b/cli/src/main/java/org/apache/any23/cli/Rover.java
index 0798dc8..49d06b6 100644
--- a/cli/src/main/java/org/apache/any23/cli/Rover.java
+++ b/cli/src/main/java/org/apache/any23/cli/Rover.java
@@ -176,7 +176,7 @@ public class Rover implements Tool {
 
     protected void performExtraction(DocumentSource documentSource) throws Exception {
         if (!any23.extract(extractionParameters, documentSource, reportingTripleHandler).hasMatchingExtractors()) {
-            throw new IllegalStateException(format("No suitable extractors found for source %s", documentSource));
+            throw new IllegalStateException(format("No suitable extractors found for source %s", documentSource.getDocumentIRI()));
         }
     }
 


[3/8] any23 git commit: Clean SimpleRoverTest outcome

Posted by le...@apache.org.
Clean SimpleRoverTest outcome


Signed-off-by:Jacek Grzebyta <gr...@gmail.com>

Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/e9728e8e
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/e9728e8e
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/e9728e8e

Branch: refs/heads/master
Commit: e9728e8e68389d205f0db0dc40b969a19a5a137f
Parents: e235954
Author: Jacek Grzebyta <gr...@gmail.com>
Authored: Fri Jul 14 16:41:38 2017 +0100
Committer: Jacek Grzebyta <gr...@gmail.com>
Committed: Fri Jul 14 16:41:38 2017 +0100

----------------------------------------------------------------------
 cli/src/test/resources/log4j.properties | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/e9728e8e/cli/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/cli/src/test/resources/log4j.properties b/cli/src/test/resources/log4j.properties
index 1e5e379..a908dc8 100644
--- a/cli/src/test/resources/log4j.properties
+++ b/cli/src/test/resources/log4j.properties
@@ -12,8 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-log4j.logger.org.apache.any23.cli.YAMLRoverTest=trace
-log4j.logger.org.apache.any23.cli.SimpleRoverTest=trace
+log4j.logger.org.apache.any23.cli.YAMLRoverTest=info
 
 log4j.rootLogger=INFO, A1
 


[4/8] any23 git commit: Add new line to the file end

Posted by le...@apache.org.
Add new line to the file end


Signed-off-by:Jacek Grzebyta <gr...@gmail.com>

Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/b3f51f5e
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/b3f51f5e
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/b3f51f5e

Branch: refs/heads/master
Commit: b3f51f5e8666f2d34c199ff4803bbac34bf29e50
Parents: e9728e8
Author: Jacek Grzebyta <gr...@gmail.com>
Authored: Fri Jul 14 16:42:46 2017 +0100
Committer: Jacek Grzebyta <gr...@gmail.com>
Committed: Fri Jul 14 16:42:46 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/any23/writer/LoggingTripleHandler.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/b3f51f5e/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java b/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
index 90435b0..a46aaff 100644
--- a/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
+++ b/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
@@ -118,4 +118,4 @@ public class LoggingTripleHandler implements TripleHandler {
     private void printHeader(PrintWriter writer) {
         writer.println("# Document-IRI\tContent-Length\tElapsed-Time\tSuccess\tExtractors:Triples");
     }
-}
\ No newline at end of file
+}


[2/8] any23 git commit: Fixed issue ANY23-310

Posted by le...@apache.org.
Fixed issue ANY23-310

- pipe proper logger in Rover.performExtraction
- make the content length counted
- use StringUtils#join for merging with delimiter

Signed-off-by:Jacek Grzebyta <gr...@gmail.com>

Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/e235954e
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/e235954e
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/e235954e

Branch: refs/heads/master
Commit: e235954ebafdc075158a12d8a5b6377714c347d0
Parents: 1b68735
Author: Jacek Grzebyta <gr...@gmail.com>
Authored: Fri Jul 14 16:27:16 2017 +0100
Committer: Jacek Grzebyta <gr...@gmail.com>
Committed: Fri Jul 14 16:27:16 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/any23/cli/Rover.java   |  2 +-
 cli/src/test/resources/log4j.properties         |  2 +-
 .../any23/writer/CompositeTripleHandler.java    |  4 ++-
 .../any23/writer/LoggingTripleHandler.java      | 29 ++++++++++++--------
 4 files changed, 22 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/e235954e/cli/src/main/java/org/apache/any23/cli/Rover.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/any23/cli/Rover.java b/cli/src/main/java/org/apache/any23/cli/Rover.java
index 26a8663..0798dc8 100644
--- a/cli/src/main/java/org/apache/any23/cli/Rover.java
+++ b/cli/src/main/java/org/apache/any23/cli/Rover.java
@@ -175,7 +175,7 @@ public class Rover implements Tool {
     }
 
     protected void performExtraction(DocumentSource documentSource) throws Exception {
-        if (!any23.extract(extractionParameters, documentSource, tripleHandler).hasMatchingExtractors()) {
+        if (!any23.extract(extractionParameters, documentSource, reportingTripleHandler).hasMatchingExtractors()) {
             throw new IllegalStateException(format("No suitable extractors found for source %s", documentSource));
         }
     }

http://git-wip-us.apache.org/repos/asf/any23/blob/e235954e/cli/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/cli/src/test/resources/log4j.properties b/cli/src/test/resources/log4j.properties
index b6af94e..1e5e379 100644
--- a/cli/src/test/resources/log4j.properties
+++ b/cli/src/test/resources/log4j.properties
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 log4j.logger.org.apache.any23.cli.YAMLRoverTest=trace
-log4j.logger.org.apache.any23.cli.SimpleRoverTest=debug
+log4j.logger.org.apache.any23.cli.SimpleRoverTest=trace
 
 log4j.rootLogger=INFO, A1
 

http://git-wip-us.apache.org/repos/asf/any23/blob/e235954e/core/src/main/java/org/apache/any23/writer/CompositeTripleHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/any23/writer/CompositeTripleHandler.java b/core/src/main/java/org/apache/any23/writer/CompositeTripleHandler.java
index d3bca97..769aa52 100644
--- a/core/src/main/java/org/apache/any23/writer/CompositeTripleHandler.java
+++ b/core/src/main/java/org/apache/any23/writer/CompositeTripleHandler.java
@@ -110,7 +110,9 @@ public class CompositeTripleHandler implements TripleHandler {
     }
 
     public void setContentLength(long contentLength) {
-        // Empty.
+        for (TripleHandler handler : children) {
+            handler.setContentLength(contentLength);
+        }
     }
     
 }

http://git-wip-us.apache.org/repos/asf/any23/blob/e235954e/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java b/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
index e214df7..90435b0 100644
--- a/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
+++ b/core/src/main/java/org/apache/any23/writer/LoggingTripleHandler.java
@@ -25,7 +25,9 @@ import org.eclipse.rdf4j.model.Value;
 import java.io.PrintWriter;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Map.Entry;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
+import org.apache.any23.util.StringUtils;
 
 /**
  * Triple handler decorator useful for logging purposes.
@@ -87,20 +89,23 @@ public class LoggingTripleHandler implements TripleHandler {
         underlyingHandler.receiveNamespace(prefix, uri, context);
     }
 
+    @Override
     public void endDocument(IRI documentIRI) throws TripleHandlerException {
         underlyingHandler.endDocument(documentIRI);
         long elapsedTime = System.currentTimeMillis() - startTime;
-        boolean success = true;
-        StringBuffer sb = new StringBuffer("[");
-        for (Entry<String, Integer> ent : contextTripleMap.entrySet()) {
-            sb.append(" ").append(ent.getKey()).append(":").append(ent.getValue());
-            if (ent.getValue() > 0) {
-                success = true;
-            }
-        }
-        sb.append("]");
+        final AtomicBoolean success = new AtomicBoolean(true);
+        
+        StringBuffer sb = new StringBuffer("[ ");
+        String[] parsers = contextTripleMap.entrySet().stream().map(e -> {
+                    if (e.getValue() > 0) {
+                        success.set(true);
+                    }
+                    return String.format("%s:%d", e.getKey(), e.getValue()); }
+                ).collect(Collectors.toList()).toArray(new String[] {});
+        sb.append(StringUtils.join(", ", parsers));
+        sb.append(" ]");
         destination.println(
-                documentIRI + "\t" + contentLength + "\t" + elapsedTime + "\t" + success + "\t" + sb.toString()
+                documentIRI + "\t" + contentLength + "\t" + elapsedTime + "\t" + success.get() + "\t" + sb.toString()
         );
         contextTripleMap.clear();
     }
@@ -111,6 +116,6 @@ public class LoggingTripleHandler implements TripleHandler {
     }
 
     private void printHeader(PrintWriter writer) {
-        writer.println("# Document-IRI\tContent-Length\tElapsed-Time\tSuccess\tExtractors");
+        writer.println("# Document-IRI\tContent-Length\tElapsed-Time\tSuccess\tExtractors:Triples");
     }
 }
\ No newline at end of file


[8/8] any23 git commit: Merge branch 'ANY23-310' of https://github.com/jgrzebyta/any23 into ANY23-310

Posted by le...@apache.org.
Merge branch 'ANY23-310' of https://github.com/jgrzebyta/any23 into ANY23-310


Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/5a486b29
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/5a486b29
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/5a486b29

Branch: refs/heads/master
Commit: 5a486b29ff114437db944b307e9866f4752a3bd5
Parents: 75e11aa 379b8c8
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Wed Jul 26 13:34:32 2017 -0700
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Wed Jul 26 13:34:32 2017 -0700

----------------------------------------------------------------------
 .../org/apache/any23/cli/SimpleRoverTest.java   | 29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------



[7/8] any23 git commit: Ref ANY23-310

Posted by le...@apache.org.
Ref ANY23-310

- add unit test with options without logging file
Signed-off-by:Jacek Grzebyta <gr...@gmail.com>

Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/379b8c8b
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/379b8c8b
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/379b8c8b

Branch: refs/heads/master
Commit: 379b8c8bdfeab0a0804d94ba5746a8a7b34fb8ff
Parents: 38c8028
Author: Jacek Grzebyta <gr...@gmail.com>
Authored: Wed Jul 26 00:35:30 2017 +0100
Committer: Jacek Grzebyta <gr...@gmail.com>
Committed: Wed Jul 26 00:35:30 2017 +0100

----------------------------------------------------------------------
 .../org/apache/any23/cli/SimpleRoverTest.java   | 29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/379b8c8b/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java
----------------------------------------------------------------------
diff --git a/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java b/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java
index 76cd5cf..f659539 100644
--- a/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java
+++ b/cli/src/test/java/org/apache/any23/cli/SimpleRoverTest.java
@@ -22,6 +22,7 @@ import java.util.Collection;
 import org.apache.any23.util.FileUtils;
 import org.apache.pdfbox.util.Charsets;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -93,5 +94,33 @@ public class SimpleRoverTest extends ToolTestBase {
         Assert.assertFalse(extractors.isEmpty());
         Assert.assertEquals("Unexpected exit code.", 0, exitCode);
     }
+    
+    /**
+     * Ref {@link https://issues.apache.org/jira/browse/ANY23-310} unit test.
+     * 
+     * Example without the logging file.
+     * 
+     * By default that test is not active. It might be useful for debugging.
+     * @throws Exception 
+     */
+    @Test
+    @Ignore
+    public void ref310ExtendedTest()
+            throws Exception {
+        File outputFile = File.createTempFile("rover-test", ".ttl", tempDirectory);
+
+        int exitCode = runTool(String.format("-o %s -f turtle -e yaml,csv -d %s %s",
+                outputFile.getAbsolutePath(),
+                baseUri,
+                copyResourceToTempFile(filePath).getAbsolutePath()));
+        
+        Assert.assertTrue(outputFile.exists());
+        // check if output file is longer than 10 chracters
+        String outputFileContent = FileUtils.readFileContent(outputFile);
+        Assert.assertTrue(outputFileContent.length() > 10);
+        
+        
+        Assert.assertEquals("Unexpected exit code.", 0, exitCode);
+    }
 
 }