MemoryMergedResult implements MergedResult { @Override public final Object getValue(final int columnIndex, final Class<?> type) throws SQLException { if (Blob.class == type || Clob.class == type || Reader.class == type || InputStream.class == type || SQLXML.class == type) { throw new SQLFeatureNotSupportedException(String.format("Get value from `%s`", type.getName())); } Object result = currentResultSetRow.getCell(columnIndex); wasNull = null == result; return result; } protected  MemoryMergedResult(final T rule, final SchemaMetaData schemaMetaData, final SQLStatementContext sqlStatementContext, final List<QueryResult> queryResults); @Override final boolean next(); @Override final Object getValue(final int columnIndex, final Class<?> type); @Override final 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 assertGetValue() throws SQLException { when(memoryResultSetRow.getCell(1)).thenReturn("1"); assertThat(memoryMergedResult.getValue(1, Object.class).toString(), is("1")); }
@Test(expected = SQLFeatureNotSupportedException.class) public void assertGetValueForBlob() throws SQLException { memoryMergedResult.getValue(1, Blob.class); }
@Test(expected = SQLFeatureNotSupportedException.class) public void assertGetValueForClob() throws SQLException { memoryMergedResult.getValue(1, Clob.class); }
@Test(expected = SQLFeatureNotSupportedException.class) public void assertGetValueForReader() throws SQLException { memoryMergedResult.getValue(1, Reader.class); }
@Test(expected = SQLFeatureNotSupportedException.class) public void assertGetValueForInputStream() throws SQLException { memoryMergedResult.getValue(1, InputStream.class); }
@Test(expected = SQLFeatureNotSupportedException.class) public void assertGetValueForSQLXML() throws SQLException { memoryMergedResult.getValue(1, SQLXML.class); }