mil.dod.th.ose.linux.serial/test/mil/dod/th/ose/linux/physical/TestSerialPortInputStream.java
@Test
    public void testReadFailure() throws IOException, FactoryException
    {
        when(FileOperations.readBuffer(anyInt(), Mockito.any(byte[].class), anyInt(), anyInt(), anyInt()))
            .thenReturn(FO_READ_FAILURE);
        
        try
        {
            m_SUT.read();
            fail("Expecting read failure");
        }
        catch (IOException e)
        {
            
        }
    }
/**
     * Verify read failure error is handled properly.
     */
Verify read failure error is handled properly.
Verify read failure error is handled properly .
@Test
    public void testReadFailure() throws IOException, FactoryException
    {
        when(FileOperations.readBuffer(anyInt(), Mockito.any(byte[].class), anyInt(), anyInt(), anyInt()))
            .thenReturn(FO_READ_FAILURE);
        try
        {
            m_SUT.read();
            fail("Expecting read failure");
        }
        catch (IOException e)
        {
        }
    }
@ Test public void testReadFailure ( ) throws IOException , FactoryException { when ( FileOperations . readBuffer ( anyInt ( ) , Mockito . any ( byte [ ] . class ) , anyInt ( ) , anyInt ( ) , anyInt ( ) ) ) . thenReturn ( FO_READ_FAILURE ) ; try { m_SUT . read ( ) ; fail ( "Expecting read failure" ) ; } catch ( IOException e ) { } }
Verify read failure error is handled properly.
Verify read failure error is handled properly .