added tests with real database