protected int getMaxUnconfirmedReads(final TransferStatus status) {
        final PreferencesReader preferences = new HostPreferences(session.getHost());
        if(TransferStatus.UNKNOWN_LENGTH == status.getLength()) {
            return preferences.getInteger("sftp.read.maxunconfirmed");
        }
        return Integer.min(((int) (status.getLength() / preferences.getInteger("connection.chunksize")) + 1),
            preferences.getInteger("sftp.read.maxunconfirmed"));
    }
@Test
    public void testUnconfirmedReadsNumber() {
        final SFTPReadFeature feature = new SFTPReadFeature(session);
        assertEquals(33, feature.getMaxUnconfirmedReads(new TransferStatus().withLength(TransferStatus.MEGA * 1L)));
        assertEquals(64, feature.getMaxUnconfirmedReads(new TransferStatus().withLength((long) (TransferStatus.GIGA * 1.3))));
    }