### Question:
JVMUtils { public static void closeAtShutdown(Closeable closeable) { if (SHUTDOWN_HOOK.addCloseable(closeable)) { try { Runtime.getRuntime().addShutdownHook(new Thread(SHUTDOWN_HOOK, "OryxShutdownHookThread")); } catch (IllegalStateException ise) { log.warn("Can't close {} at shutdown since shutdown is in progress", closeable); } } } private  JVMUtils(); static void closeAtShutdown(Closeable closeable); static long getUsedMemory();  }### Answer:
@Test public void testShutdownHook() { JVMUtils.closeAtShutdown(() -> {}); }