String basepath = file.getParentFile().getAbsolutePath();
IServer server = new HttpServer(new FileServiceRequestHandler(basepath));
server.start();
HttpClientConnection con = new HttpClientConnection("localhost", server.getLocalPort());
IHttpRequest request = new GetRequest("/" + file.getName());
request.setHeader("Range", "bytes=-10");
IHttpResponse response = con.call(request);
Assert.assertEquals(206, response.getStatus());
Assert.assertEquals("le></head>", response.getBody().readString());
file.delete();
con.close();
server.close();
}