@Override
    public Object getValue(final int columnIndex, final Class<?> type) throws SQLException {
        if (boolean.class == type) {
            return resultSet.getBoolean(columnIndex);
        }
        if (byte.class == type) {
            return resultSet.getByte(columnIndex);
        }
        if (short.class == type) {
            return resultSet.getShort(columnIndex);
        }
        if (int.class == type) {
            return resultSet.getInt(columnIndex);
        }
        if (long.class == type) {
            return resultSet.getLong(columnIndex);
        }
        if (float.class == type) {
            return resultSet.getFloat(columnIndex);
        }
        if (double.class == type) {
            return resultSet.getDouble(columnIndex);
        }
        if (String.class == type) {
            return resultSet.getString(columnIndex);
        }
        if (BigDecimal.class == type) {
            return resultSet.getBigDecimal(columnIndex);
        }
        if (byte[].class == type) {
            return resultSet.getBytes(columnIndex);
        }
        if (Date.class == type) {
            return resultSet.getDate(columnIndex);
        }
        if (Time.class == type) {
            return resultSet.getTime(columnIndex);
        }
        if (Timestamp.class == type) {
            return resultSet.getTimestamp(columnIndex);
        }
        if (Blob.class == type) {
            return resultSet.getBlob(columnIndex);
        }
        if (Clob.class == type) {
            return resultSet.getClob(columnIndex);
        }
        if (Array.class == type) {
            return resultSet.getArray(columnIndex);
        }
        return resultSet.getObject(columnIndex);
    }
@Test
    void assertGetValueByDouble() throws SQLException {
        ResultSet resultSet = mock(ResultSet.class);
        when(resultSet.getDouble(1)).thenReturn(1.0D);
        assertThat(new JDBCStreamQueryResult(resultSet).getValue(1, double.class), is(1.0D));
    }