@SuppressWarnings({"rawtypes", "unchecked"})
    @Override
    public Object getValue(final int columnIndex, final Class<?> type) throws SQLException {
        Optional<ColumnProjection> columnProjection = selectStatementContext.getProjectionsContext().findColumnProjection(columnIndex);
        if (!columnProjection.isPresent()) {
            return mergedResult.getValue(columnIndex, type);
        }
        Optional<MaskTable> maskTable = maskRule.findMaskTable(columnProjection.get().getOriginalTable().getValue());
        if (!maskTable.isPresent()) {
            return mergedResult.getValue(columnIndex, type);
        }
        Optional<MaskAlgorithm> maskAlgorithm = maskTable.get().findAlgorithm(columnProjection.get().getName().getValue());
        if (!maskAlgorithm.isPresent()) {
            return mergedResult.getValue(columnIndex, type);
        }
        Object originalValue = mergedResult.getValue(columnIndex, Object.class);
        return null == originalValue ? null : maskAlgorithm.get().mask(originalValue);
    }
@Test
    void assertGetValueWithoutMaskTable() throws SQLException {
        when(mergedResult.getValue(1, String.class)).thenReturn("VALUE");
        assertThat(new MaskMergedResult(mockMaskRuleTableAbsent(), mockSelectStatementContextForMaskTableAbsent(), mergedResult).getValue(1, String.class), is("VALUE"));
    }