Refined unit tests to work with postgres