@VisibleForTesting
    static boolean isReaperThreadRunning() {
        synchronized (REAPER_THREAD_LOCK) {
            return null != REAPER_THREAD && REAPER_THREAD.isAlive();
        }
    }
@Test
    void testReaperThreadStartFailed() throws Exception {

        try {
            new SafetyNetCloseableRegistry(OutOfMemoryReaperThread::new);
        } catch (java.lang.OutOfMemoryError error) {
        }
        assertThat(SafetyNetCloseableRegistry.isReaperThreadRunning()).isFalse();

        // the OOM error will not lead to failure of subsequent constructor call.
        SafetyNetCloseableRegistry closeableRegistry = new SafetyNetCloseableRegistry();
        assertThat(SafetyNetCloseableRegistry.isReaperThreadRunning()).isTrue();

        closeableRegistry.close();
    }