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