Improvements to some JDatabase tests and the mocker
Removed empty and unreachable tests (Fix #4697)