Improvements to some JDatabase tests and the mocker