Fixed SQL script used to retrieve standard variables in a project given their names

Created unit tests to cover the ff scenarios :
 - for unknown variable names
 - for known existing variables
 - for newly created variables

 GCP-10137

 Reviewer : Mae Turiana
Update code to resolve Sonar reported problems

GCP-10137

Reviewer : Mae Turiana