I have a method which runs a JDBC call into a database to gather expected results which I then assert against with results gathered from UI using another method using Selenium.
The problem I'm facing here is that it's possible for the query to not get any results so when I call the method which would send back a string, it actually sends back NULL when the query result is empty.
This causes problems when I try to assert against the UI values. Selenium will return an empty string for the value in question while the db returns NULL.
So to get my assertEquals to match I ideally want the db method to return "" instead of NULL.
I've tried a .replace and an IF statement but it always returns NULL.
The code from my JDBC method looks like this in case this helps:
String strMedicare = rs.getString("_Provider_Number");
return strMedicare;