Bugfix and tests fix
Moved unit test to integration test (was hitting the DB, which may not exist in unit tests)