PostgreSQLJdbcDumper extends AbstractJDBCDumper { @Override protected PreparedStatement createPreparedStatement(final Connection connection, final String sql) throws SQLException { PreparedStatement result = connection.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); result.setFetchSize(100); return result; } PostgreSQLJdbcDumper(final InventoryDumperConfiguration inventoryDumperConfig, final DataSourceManager dataSourceManager);   }
@Test public void assertCreatePreparedStatement() throws SQLException { DataSource dataSource = dataSourceManager.getDataSource(mockDumperConfiguration().getDataSourceConfiguration()); try (Connection connection = dataSource.getConnection(); PreparedStatement preparedStatement = postgreSQLJdbcDumper.createPreparedStatement(connection, "SELECT * FROM t_order")) { assertThat(preparedStatement.getFetchSize(), is(100)); } }