diff --git a/src/test/java/emissary/test/core/junit5/UnitTest.java b/src/test/java/emissary/test/core/junit5/UnitTest.java index fbcc7e43e2..7cec685c97 100644 --- a/src/test/java/emissary/test/core/junit5/UnitTest.java +++ b/src/test/java/emissary/test/core/junit5/UnitTest.java @@ -51,8 +51,9 @@ public abstract class UnitTest { protected final AtomicReference> answerFileClassRef = new AtomicReference<>(getClass()); @TempDir + @SuppressWarnings("NonFinalStaticField") public static File temporaryDirectory; - @SuppressWarnings("ConstantField") + @SuppressWarnings({"ConstantField", "NonFinalStaticField"}) protected static String TMPDIR = "/tmp"; @Nullable protected Package thisPackage = null; @@ -155,12 +156,12 @@ protected synchronized void useAlternateAnswerFileSource(Class ansClz) { answerFileClassRef.set(ansClz); } - private List getMyTestAnswerFiles(Class ansClz) { + private static List getMyTestAnswerFiles(Class ansClz) { ResourceReader rr = new ResourceReader(); - return getMyTestAnswerFiles(rr, ansClz); + return getMyTestAnswerFiles(ansClz, rr); } - private List getMyTestAnswerFiles(ResourceReader resourceReader, Class ansClz) { + private static List getMyTestAnswerFiles(Class ansClz, ResourceReader resourceReader) { return resourceReader.findXmlResourcesFor(ansClz); }