ImplementationPlatformReaper extends Thread { public void stopReaping() { synchronized (lock) { LOGGER.info("stopping reaper"); stopReaping = true; lock.notifyAll(); } } ImplementationPlatformReaper(
            final JVoiceXmlImplementationPlatform impl, final JVoiceXmlUserInput in,
            final JVoiceXmlSystemOutput out); void setReapingDelay(final long delay); @Override void run(); void stopReaping();  }
@Test public void testStopReaping() throws InterruptedException { final JVoiceXmlImplementationPlatform platform = new JVoiceXmlImplementationPlatform(null, null, null, null); final Session session = Mockito.mock(Session.class); Mockito.when(session.getSessionId()).thenReturn("42"); platform.setSession(session); final ImplementationPlatformReaper reaper = new ImplementationPlatformReaper(platform, null, null); reaper.start(); Thread.sleep(100); reaper.stopReaping(); }