}
public void testRun() throws Exception {
try {
MockHttpRequest request = new MockHttpRequest();
MockHttpResponse response = new MockHttpResponse();
request.setHttpResponse(response);
request.setParameterString("");
request.setRequestURI("/functional_test/get");
request.setHeader("Host", "localhost");
request.setHeader("Accept", "text/html, text/plain, text/sgml, */*;q=0.01");
request.setHeader("Accept-Encoding", "gzip, compress");
request.setHeader("Accept-Language", "ja, en");
service.handleRequest(request);
assertEquals(200, response.getStatus().getCode());
assertEquals("OK", response.getReason());
assertEquals("text/html", response.getContentType());
assertEquals("Hello, World.", response.getOutputAsText());
} catch (RaiseException e) {
printJRubyBacktrace(e);
}
}