### Question:
Shutdown extends QBeanSupport { public void startService() { getServer().shutdown (); }  void startService();  }### Answer:
@Test public void testStartService() throws Throwable { Shutdown shutdown = new Shutdown(); String[] args = new String[2]; args[0] = ""; args[1] = "testString"; shutdown.setServer(server); shutdown.startService(); assertSame(server, shutdown.getServer(), "shutdown.getServer()"); }
@Test public void testStartServiceThrowsNullPointerException() throws Throwable { try { new Shutdown().startService(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"org.jpos.q2.Q2.shutdown()\" because the return value of \"org.jpos.q2.qbean.Shutdown.getServer()\" is null", ex.getMessage(), "ex.getMessage()"); } } }