req = new GetMethodWebRequest(CONTEXT_URL + "/services/testHttpMethodRestrict");
try {
response = client.getResponse(req);
fail("Expect the exception here");
} catch (Exception ex) {
HttpException httpException = (HttpException)ex;
assertEquals("Get a wrong response code", 405, httpException.getResponseCode());
}
}