Added jUnit tests for DB