@@ -0,0 +1,1314 @@
+package com.leandog.gametel.driver;%0A%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0Aimport java.io.IOException;%0Aimport java.io.PrintWriter;%0A%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0Aimport org.mortbay.jetty.Request;%0A%0Apublic class GametelRequestHandlerTest %7B%0A    %0A    @Mock GametelServer gametelServer;%0A    @Mock Request request;%0A    @Mock HttpServletResponse response;%0A    @Mock PrintWriter responseWriter;%0A    %0A    private GametelRequestHandler handler;%0A    %0A    @Before%0A    public void setUp() throws IOException %7B%0A        initMocks();%0A        handler = new GametelRequestHandler(gametelServer);%0A    %7D%0A    %0A    @Test%0A    public void itStopsTheServerWhenAskedTo() throws Exception %7B%0A        when(request.getPathInfo()).thenReturn(%22/kill%22);%0A        handle();%0A        verify(gametelServer).stop();%0A    %7D%0A%0A    private void initMocks() throws IOException %7B%0A        MockitoAnnotations.initMocks(this);%0A        when(response.getWriter()).thenReturn(responseWriter);%0A    %7D%0A%0A    private void handle() %7B%0A        try %7B%0A            handler.handle(null, request, response, 0);%0A        %7D catch (Exception e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%7D%0A

add test for GametelRequestHandler when killing the server