### Question:
ShardingPreparedStatement extends AbstractPreparedStatementAdapter { @Override public int executeUpdate() throws SQLException { try { Collection<PreparedStatementUnit> preparedStatementUnits = route(); return new PreparedStatementExecutor( getShardingConnection().getShardingContext().getExecutorEngine(), getRouteResult().getSqlStatement().getType(), preparedStatementUnits, getParameters()).executeUpdate(); } finally { clearBatch(); } } ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql);  ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql, final int resultSetType, final int resultSetConcurrency);  ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql, final int autoGeneratedKeys);  ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability); @Override ResultSet executeQuery(); @Override int executeUpdate(); @Override boolean execute(); @Override void clearBatch(); @Override void addBatch(); @Override int[] executeBatch();  }### Answer:
@Test public void assertExecuteUpdateWithParameter() throws SQLException { for (ShardingDataSource each : shardingDataSources.values()) { try ( Connection connection = each.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement(replacePreparedStatement(DatabaseTestSQL.DELETE_WITHOUT_SHARDING_VALUE_SQL))) { preparedStatement.setString(1, "init"); assertThat(preparedStatement.executeUpdate(), is(4)); preparedStatement.setString(1, "null"); assertThat(preparedStatement.executeUpdate(), is(0)); preparedStatement.setString(1, "init"); assertThat(preparedStatement.executeUpdate(), is(0)); } } }
@Test public void assertExecuteUpdateWithoutParameter() throws SQLException { for (ShardingDataSource each : shardingDataSources.values()) { String sql = String.format(DatabaseTestSQL.DELETE_WITHOUT_SHARDING_VALUE_SQL, "'init'"); try ( Connection connection = each.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement(sql)) { assertThat(preparedStatement.executeUpdate(), is(4)); assertThat(preparedStatement.executeUpdate(), is(0)); assertThat(preparedStatement.executeUpdate(), is(0)); } } }