### Question:
ShardingPreparedStatement extends AbstractPreparedStatementAdapter { @Override public boolean execute() throws SQLException { try { Collection<PreparedStatementUnit> preparedStatementUnits = route(); return new PreparedStatementExecutor( getShardingConnection().getShardingContext().getExecutorEngine(), getRouteResult().getSqlStatement().getType(), preparedStatementUnits, getParameters()).execute(); } 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 assertExecuteWithParameter() throws SQLException { for (ShardingDataSource each : shardingDataSources.values()) { try ( Connection connection = each.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement(DatabaseTestSQL.SELECT_COUNT_AS_ORDERS_COUNT_SQL)) { preparedStatement.setString(1, "init"); assertTrue(preparedStatement.execute()); assertTrue(preparedStatement.getResultSet().next()); assertThat(preparedStatement.getResultSet().getLong(1), is(4L)); preparedStatement.setString(1, "null"); assertTrue(preparedStatement.execute()); assertTrue(preparedStatement.getResultSet().next()); assertThat(preparedStatement.getResultSet().getLong(1), is(0L)); preparedStatement.setString(1, "init"); assertTrue(preparedStatement.execute()); assertTrue(preparedStatement.getResultSet().next()); assertThat(preparedStatement.getResultSet().getLong(1), is(4L)); } } }
@Test public void assertExecuteWithoutParameter() throws SQLException { String sql = String.format(DatabaseTestSQL.DELETE_WITHOUT_SHARDING_VALUE_SQL, "'init'"); for (ShardingDataSource each : shardingDataSources.values()) { try ( Connection connection = each.getConnection(); PreparedStatement preparedStatement = connection.prepareStatement(sql)) { assertFalse(preparedStatement.execute()); assertFalse(preparedStatement.execute()); assertFalse(preparedStatement.execute()); } } }