### Question:
OracleQueryRewriter extends OffsetFetchQueryRewriter { @Override public String rewriteFilterItem(final FilterItem item) { if (item.getOperand() instanceof String && item.getOperand().equals("")) { return super.rewriteFilterItem(new FilterItem(item.getSelectItem(), item.getOperator(), null)); } else { return super.rewriteFilterItem(item); } } OracleQueryRewriter(JdbcDataContext dataContext); @Override ColumnType getColumnType(int jdbcType, String nativeType, Integer columnSize); @Override String rewriteColumnType(ColumnType columnType, Integer columnSize); @Override String rewriteFilterItem(final FilterItem item); static final int FIRST_FETCH_SUPPORTING_VERSION; }### Answer:
@Test public void testReplaceEmptyStringWithNull() throws Exception { final String alias = "alias"; SelectItem selectItem = new SelectItem("expression", alias); final FilterItem filterItem = new FilterItem(selectItem, OperatorType.DIFFERENT_FROM, ""); final String rewrittenValue = qr.rewriteFilterItem(filterItem); final String expectedValue = alias + " IS NOT NULL"; assertEquals(expectedValue, rewrittenValue); }