Message tests, fix coverage for Database