mil.dod.th.ose.time.service/test/mil/dod/th/ose/time/service/TestTimeChangeServiceThread.java
@Test
    public void testRunServerAcceptException() throws IOException, InterruptedException
    {
        doThrow(IOException.class).when(m_ServerSocket).accept();
        
        Thread thread = new Thread(m_SUT);
        thread.start();
        
        verify(m_ServerSocket, timeout(2000).atLeast(2)).accept();
        
        m_SUT.stopRun();
        thread.join(5000);
        
        verify(m_SysTimeWrapper, never()).setSystemTime(Mockito.anyLong());
    }
/**
     * Verify that an exception with the server socket receiving client connections
     * is handled properly.
     */
Verify that an exception with the server socket receiving client connections
is handled properly.
Verify that an exception with the server socket receiving client connections is handled properly .
@Test
    public void testRunServerAcceptException() throws IOException, InterruptedException
    {
        doThrow(IOException.class).when(m_ServerSocket).accept();
        Thread thread = new Thread(m_SUT);
        thread.start();
        verify(m_ServerSocket, timeout(2000).atLeast(2)).accept();
        m_SUT.stopRun();
        thread.join(5000);
        verify(m_SysTimeWrapper, never()).setSystemTime(Mockito.anyLong());
    }
@ Test public void testRunServerAcceptException ( ) throws IOException , InterruptedException { doThrow ( IOException . class ) . when ( m_ServerSocket ) . accept ( ) ; Thread thread = new Thread ( m_SUT ) ; thread . start ( ) ; verify ( m_ServerSocket , timeout ( 2000 ) . atLeast ( 2 ) ) . accept ( ) ; m_SUT . stopRun ( ) ; thread . join ( 5000 ) ; verify ( m_SysTimeWrapper , never ( ) ) . setSystemTime ( Mockito . anyLong ( ) ) ; }
Verify that an exception with the server socket receiving client connections
 is handled properly.
Verify that an exception with the server socket receiving client connections is handled properly .