TransparentMergedResult implements MergedResult { @Override public boolean next() throws SQLException { return queryResult.next(); }  @Override boolean next(); @Override Object getValue(final int columnIndex, final Class<?> type); @Override Object getCalendarValue(final int columnIndex, final Class<?> type, final Calendar calendar); @Override InputStream getInputStream(final int columnIndex, final String type); @Override boolean wasNull();  }
@Test public void assertNext() throws SQLException { QueryResult queryResult = mock(QueryResult.class); when(queryResult.next()).thenReturn(true, false); TransparentMergedResult actual = new TransparentMergedResult(queryResult); assertTrue(actual.next()); assertFalse(actual.next()); }