First unit tests
Fix encoding problem of PG by using sqlite for tests