Fixed bug in postgres function. Added test of code calling the postgres function.
Fixed bug in postgres function. Added test of code calling the postgres function.

Department-for-Work-and-Pensions/ClaimCapture,Department-for-Work-and-Pensions/ClaimCapture,Department-for-Work-and-Pensions/ClaimCapture