StreamMergedResult implements MergedResult { @Override public Object getCalendarValue(final int columnIndex, final Class<?> type, final Calendar calendar) throws SQLException { Object result = getCurrentQueryResult().getCalendarValue(columnIndex, type, calendar); 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 assertGetCalendarValue() throws SQLException { QueryResult queryResult = mock(QueryResult.class); Calendar calendar = Calendar.getInstance(); when(queryResult.getCalendarValue(1, Date.class, calendar)).thenReturn(new Date(0L)); streamMergedResult.setCurrentQueryResult(queryResult); assertThat(streamMergedResult.getCalendarValue(1, Date.class, calendar), is(new Date(0L))); }