@VisibleForTesting
    List<ScheduledFuture<?>> getScheduledFutures() {
        return scheduledFutures;
    }
@Test
    void requestClientToClose() throws Exception {
        doHandshakeComplete();
        Mockito.reset(eventLoopSpy);
        authenticateChannel();
        verify(eventLoopSpy).schedule(scheduledCaptor.capture(), anyLong(), eq(TimeUnit.SECONDS));
        Runnable requestClientToClose = scheduledCaptor.getValue();

        int taskListSize = handler.getScheduledFutures().size();
        doReturn(true).when(channel).isActive();
        requestClientToClose.run();
        assertEquals(taskListSize + 1, handler.getScheduledFutures().size());
        Object capture = writeCaptor.getValue();
        assertTrue(capture instanceof TextWebSocketFrame);
        TextWebSocketFrame frame = (TextWebSocketFrame) capture;
        assertEquals("_CLOSE_", frame.text());
    }