public void shouldPassIncomingConnectionToSocketAccepter() throws IOException, InterruptedException {
SocketAccepter accepter = mock(SocketAccepter.class);
SocketServer server = new SocketCatcher(accepter, 1);
MockSocket socket = new MockSocket("GET /?responder=socketCatcher&ticket=1 HTTP/1.1\r\n\r\n");
server.serve(socket);
verify(accepter).acceptSocket(socket);
}
@Test(expected = IllegalArgumentException.class)