diff --git a/restful-server-example-test/src/test/java/ca/uhn/example/ExampleTest.java b/restful-server-example-test/src/test/java/ca/uhn/example/ExampleTest.java index 424b2268cd1..95afd1b182f 100644 --- a/restful-server-example-test/src/test/java/ca/uhn/example/ExampleTest.java +++ b/restful-server-example-test/src/test/java/ca/uhn/example/ExampleTest.java @@ -21,7 +21,9 @@ public class ExampleTest { @AfterClass public static void afterClass() throws Exception { - ourServer.stop(); + if (ourServer != null) { + ourServer.stop(); + } System.clearProperty("ca.uhn.fhir.to.TesterConfig_SYSPROP_FORCE_SERVERS");