mil.dod.th.ose.linux.serial/test/mil/dod/th/ose/linux/physical/TestSerialPortProxyImpl.java
@Test
    public void testCloseException()
    {               
        when(FileOperations.close(anyInt())).thenReturn(-1);
        m_SUT.close();
        
        verify(m_LogService).warning("Unable to close serial port: %s", PORT_A_NAME);
        PowerMockito.verifyStatic();
        FileOperations.close(anyInt());
    }
/**
     * Verify if {@link FileOperations} reports an error on close, an exception is thrown
     */
Verify if  FileOperations reports an error on close, an exception is thrown
Verify if FileOperations reports an error on close an exception is thrown
@Test
    public void testCloseException()
    {               
        when(FileOperations.close(anyInt())).thenReturn(-1);
        m_SUT.close();
        verify(m_LogService).warning("Unable to close serial port: %s", PORT_A_NAME);
        PowerMockito.verifyStatic();
        FileOperations.close(anyInt());
    }
@ Test public void testCloseException ( ) { when ( FileOperations . close ( anyInt ( ) ) ) . thenReturn ( - 1 ) ; m_SUT . close ( ) ; verify ( m_LogService ) . warning ( "Unable to close serial port: %s" , PORT_A_NAME ) ; PowerMockito . verifyStatic ( ) ; FileOperations . close ( anyInt ( ) ) ; }
Verify if {@link FileOperations} reports an error on close, an exception is thrown
Verify if { @link FileOperations } reports an error on close an exception is thrown