Add preliminary tests

First tests for db operations in test/