diff --git a/src/test/java/org/ids_mannheim/WorkerTest.java b/src/test/java/org/ids_mannheim/WorkerTest.java
index 5eab373..c4d8758 100644
--- a/src/test/java/org/ids_mannheim/WorkerTest.java
+++ b/src/test/java/org/ids_mannheim/WorkerTest.java
@@ -8,6 +8,7 @@
 import java.io.*;
 import java.util.ArrayList;
 import java.util.Map;
+import java.util.Objects;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -49,8 +50,8 @@
         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);
+            IOUtils.copy(Objects.requireNonNull(Thread.currentThread().getContextClassLoader()
+                    .getResourceAsStream("goe_sample.conllu.gz")), out);
         }
         ArrayList<String> fnames = new ArrayList<>();
         fnames.add(tempFile.getAbsolutePath());
@@ -75,9 +76,7 @@
         gold.forEach((key, value) -> {
             AtomicInteger observed = map.get(key);
             assertNotNull(observed);
-            if (observed != null) {
-                assertEquals(value, observed.intValue());
-            }
+            assertEquals(value, observed.intValue());
         });
         assertTrue(errContent.toString().contains("with 1 text"));
         assertTrue(errContent.toString().contains("100%"));
@@ -101,8 +100,8 @@
         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);
+            IOUtils.copy(Objects.requireNonNull(Thread.currentThread().getContextClassLoader()
+                    .getResourceAsStream("goe_sample.conllu.gz")), out);
         }
         ArrayList<String> fnames = new ArrayList<>();
         fnames.add(tempFile.getAbsolutePath());
@@ -128,9 +127,7 @@
 //            System.out.println("KEY: " + key);
             AtomicInteger observed = map.get(key);
             assertNotNull(observed);
-            if (observed != null) {
-                assertEquals(value, observed.intValue());
-            }
+            assertEquals(value, observed.intValue());
         });
         assertTrue(errContent.toString().contains("100%"));
     }
@@ -148,8 +145,8 @@
         File tempFile = File.createTempFile("entities", ".conllu");
         tempFile.deleteOnExit();
         try (FileOutputStream out = new FileOutputStream(tempFile)) {
-            IOUtils.copy(Thread.currentThread().getContextClassLoader()
-                    .getResourceAsStream("entities.conllu"), out);
+            IOUtils.copy(Objects.requireNonNull(Thread.currentThread().getContextClassLoader()
+                    .getResourceAsStream("entities.conllu")), out);
         }
         ArrayList<String> fnames = new ArrayList<>();
         fnames.add(tempFile.getAbsolutePath());
@@ -193,8 +190,8 @@
         File tempFile = File.createTempFile("goe_sample", ".conllu.xz");
         tempFile.deleteOnExit();
         try (FileOutputStream out = new FileOutputStream(tempFile)) {
-            IOUtils.copy(Thread.currentThread().getContextClassLoader()
-                    .getResourceAsStream("goe_sample.conllu.xz"), out);
+            IOUtils.copy(Objects.requireNonNull(Thread.currentThread().getContextClassLoader()
+                    .getResourceAsStream("goe_sample.conllu.xz")), out);
         }
         ArrayList<String> fnames = new ArrayList<>();
         fnames.add(tempFile.getAbsolutePath());
