Tests database