cleaned up testDBAgentSQLite3.cc by adding a helper function.