public function testImproperInstantiation()
 {
     global $_SERVER;
     // emulate client request
     $_SERVER["REQUEST_METHOD"] = "FOOBAR";
     $_SERVER["SCRIPT_NAME"] = "/service.php";
     $vo_response = new ResponseHTTP();
     $vo_request = new RequestHTTP($vo_response, array("dont_create_new_session" => true));
     $vo_request->setRawPostData('This is not JSON!');
     $vo_service = new BaseJSONService($vo_request, "invalid_table");
     $this->assertTrue($vo_service->hasErrors());
     // we don't check error messages because they tend to change frequently but
     // the above code should generate 3 errors (invalid table, no JSON request body
     // and invalid request method)
     $this->assertEquals(3, sizeof($vo_service->getErrors()));
 }