unit testing for postgresql handler