### Question:
HadoopUtils { public static void closeAtShutdown(Closeable closeable) { if (SHUTDOWN_HOOK.addCloseable(closeable)) { try { ShutdownHookManager.get().addShutdownHook(SHUTDOWN_HOOK, FileSystem.SHUTDOWN_HOOK_PRIORITY + 40); } catch (IllegalStateException ise) { log.warn("Can't close {} at shutdown since shutdown is in progress", closeable); } } } private  HadoopUtils(); static void closeAtShutdown(Closeable closeable);  }### Answer:
@Test public void testShutdownHook() { HadoopUtils.closeAtShutdown(() -> {}); }