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

        try (SafetyNetCloseableRegistry ignored = new SafetyNetCloseableRegistry()) {
            assertThat(SafetyNetCloseableRegistry.isReaperThreadRunning()).isTrue();

            try (SafetyNetCloseableRegistry ignored2 = new SafetyNetCloseableRegistry()) {
                assertThat(SafetyNetCloseableRegistry.isReaperThreadRunning()).isTrue();
            }
            assertThat(SafetyNetCloseableRegistry.isReaperThreadRunning()).isTrue();
        }
        assertThat(SafetyNetCloseableRegistry.isReaperThreadRunning()).isFalse();
    }