Prerlevare per ogni record della tabella U_FH_ORDINI_PENDENTI le colonne numero_modulo e stato_ordine e controllore che nella tabella FH_ASSET_RICHIESTO corrisponda lo stato_ordine.
public boolean runTest(MappingTestCustom mappingTestCustom) {
boolean result = true;
long recordNum = 1;
Connection connection = null;
Statement statement = null;
ResultSet resultSet = null;

ConnectionInterface connectionInterface = ConnectionFactory
.getInstance();
connection = connectionInterface
.getConnection(mappingTestCustom.getConnectionStri ng());

try {
String selectOrdiniPendentiQuery = "SELECT NUMERO_MODULO,STATO_ORDINE FROM DBO.U_FH_ORDINI_PENDENTI ";

String selectAssetRichiestoQuery = "SELECT NUMERO_MODULO,STATO_ORDINE FROM DBO.FH_ASSET_RICHIESTO ";

statement = connection.createStatement();
resultSet = statement.executeQuery(selectOrdiniPendentiQuery);
PreparedStatement preparedStatementOrdiniPendenti = connection
.prepareStatement(selectOrdiniPendentiQuery);
PreparedStatement preparedStatementAssetRichiesto = connection
.prepareStatement(selectAssetRichiestoQuery);
//resultSetAssetRichiesto = statement.executeQuery(selectAssetRichiestoQuery);
//String numero_modulo_A_R = resultSetAssetRichiesto.getString(1);
//String stato_ordine_A_R = resultSetAssetRichiesto.getString(2);
while (resultSet.next()) {
String numero_modulo_O_P = resultSet.getString(1);
String stato_ordine_O_P = resultSet.getString(2);
result = true;
//ResultSet resultSetAssetRichiesto = preparedStatementAssetRichiesto
// .executeQuery();
// String numero_modulo_A_R = resultSetAssetRichiesto.getString(1);
// String stato_ordine_A_R = resultSetAssetRichiesto.getString(2);
//preparedStatementAssetRichiesto.setString(1, numero_modulo_A_R);

ResultSet resultSetAssetRichiesto = preparedStatementAssetRichiesto
.executeQuery();


String numero_modulo_A_R = resultSetAssetRichiesto.getString(1);
String stato_ordine_A_R = resultSetAssetRichiesto.getString(2);
if (resultSetAssetRichiesto.equals(numero_modulo_O_P) ) {