Unittest for db