Work on tests, fixed some bugs in CheckDatasourceServlet.