StreamMergedResult implements MergedResult { @Override public final InputStream getInputStream(final int columnIndex, final String type) throws SQLException { InputStream result = getCurrentQueryResult().getInputStream(columnIndex, type); wasNull = getCurrentQueryResult().wasNull(); return result; }  @Override Object getValue(final int columnIndex, final Class<?> type); @Override Object getCalendarValue(final int columnIndex, final Class<?> type, final Calendar calendar); @Override final InputStream getInputStream(final int columnIndex, final String type); @Override final boolean wasNull();  }
@Test public void assertGetInputStream() throws SQLException { QueryResult queryResult = mock(QueryResult.class); InputStream value = mock(InputStream.class); when(queryResult.getInputStream(1, "Ascii")).thenReturn(value); streamMergedResult.setCurrentQueryResult(queryResult); assertThat(streamMergedResult.getInputStream(1, "Ascii"), is(value)); }