resultSet = statement.executeQuery(sql);
if (resultSet.next()) {
return resultSet.getString(1);
}
} catch (Throwable e) {
throw new JTesterException("Error while executing statement: " + sql, e);
} finally {
closeQuietly(connection, statement, resultSet);
}
// in case no value was found, throw an exception
throw new JTesterException("No item value found: " + sql);
}