### Question:
LoggingService { public static void instanceConfigUpdated() { try { setupLogger(); } catch (Exception exp) { logError(MODULE_NAME, exp.getMessage(), exp); } } private  LoggingService(); static void logInfo(String moduleName, String msg); static void logWarning(String moduleName, String msg); static void logDebug(String moduleName, String msg); static void logError(String moduleName, String msg, Throwable e); static void setupLogger(); static void setupMicroserviceLogger(String microserviceUuid, long logSize); static boolean microserviceLogInfo(String microserviceUuid, String msg); static boolean microserviceLogWarning(String microserviceUuid, String msg); static void instanceConfigUpdated();  }### Answer:
@Test public void testInstanceConfigUpdated() { try { LoggingService.instanceConfigUpdated(); PowerMockito.verifyStatic(LoggingService.class); LoggingService.setupLogger(); } catch (Exception e) { fail("This should not happen"); } }
@Test public void TestInstanceConfigUpdated() throws IOException { Exception e = new SecurityException("This is exception"); PowerMockito.doThrow(e).when(logger).setLevel(Mockito.any()); LoggingService.instanceConfigUpdated(); PowerMockito.verifyStatic(LoggingService.class); LoggingService.setupLogger(); PowerMockito.verifyStatic(LoggingService.class); LoggingService.logError(MODULE_NAME, e.getMessage(), e); Mockito.verify(logger).logp(Level.SEVERE, Thread.currentThread().getName(), MODULE_NAME, e.getMessage(), e); }