diff --git a/src/test/java/org/ids_mannheim/WorkerTest.java b/src/test/java/org/ids_mannheim/WorkerTest.java
new file mode 100644
index 0000000..8f3020f
--- /dev/null
+++ b/src/test/java/org/ids_mannheim/WorkerTest.java
@@ -0,0 +1,78 @@
+package org.ids_mannheim;
+
+import org.apache.commons.io.IOUtils;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Logger;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+class WorkerTest {
+    private final ByteArrayOutputStream errContent = new ByteArrayOutputStream();
+    private final PrintStream originalErr = System.err;
+    Worker worker;
+    ConcurrentHashMap<String, AtomicInteger> map;
+    Map<String, Integer> gold = Map.of(
+            "und	und	KON	Fluchen	Fluchen	NN", 1,
+            "Bestreben	Bestreben	NN	,	,	$,", 1,
+            "Bürger	Bürger	NN	sich	sich	PRF", 1,
+            "dieses	dies	PDAT	würdigen	würdig	ADJA", 1,
+            "im	in	APPRART	Kriegshandwerk	Kriegshandwerk	NN", 1,
+            "man	man	PIS	nur	nur	ADV", 1,
+            "von	von	APPR	Longwy	--	NE", 3,
+            "nicht	nicht	PTKNEG	ungeschickt	ungeschickt	ADJD", 1,
+            "Republikaner	Republikaner	NN	und	und	KON", 1,
+            "Patriotismus	Patriotismus	NN	derer	die	PDS", 1
+    );
+
+    @BeforeEach
+    public void setUpStreams() {
+        System.setErr(new PrintStream(errContent));
+    }
+
+    @AfterEach
+    public void restoreStreams() {
+        System.setErr(originalErr);
+    }
+
+    @Test
+    void resultAndOutputAreCorrect() throws IOException {
+        File tempFile = File.createTempFile("goe_sample", ".conllu.gz");
+        tempFile.deleteOnExit();
+        try (FileOutputStream out = new FileOutputStream(tempFile)) {
+            IOUtils.copy(Thread.currentThread().getContextClassLoader()
+                    .getResourceAsStream("goe_sample.conllu.gz"), out);
+        }
+        ArrayList<String> fnames = new ArrayList<>();
+        fnames.add(tempFile.getAbsolutePath());
+        map = new ConcurrentHashMap<>();
+        LinkedBlockingQueue<Integer> queue = new LinkedBlockingQueue<>(2);
+        worker = new Worker(
+                queue,
+                fnames,
+                2,
+                8,
+                10,
+                map,
+                true,
+                new WorkerNodePool(""),
+                new Progressbar(tempFile.length()),
+                Logger.getLogger(TotalNGram.class.getSimpleName()));
+
+        queue.add(0);
+        queue.add(-1);
+        worker.run();
+        gold.forEach((key, value) -> assertEquals(value, map.get(key).intValue()));
+        assertTrue(errContent.toString().contains("with 1 text"));
+        assertTrue(errContent.toString().contains("100%"));
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/goe_sample.conllu.gz b/src/test/resources/goe_sample.conllu.gz
new file mode 100644
index 0000000..252904a
--- /dev/null
+++ b/src/test/resources/goe_sample.conllu.gz
Binary files differ
