@Test(expected = UnsupportedOperationException.class)
    public void test() throws IOException {
        pq = new PacketQueue();
        cl = new ConnectionListener(Settings.getPortNumber(), "", pq);
        Thread simserver = new Thread(new Runnable() {
            @Override
            public void run() {
                GameNetworkInterface net;
                while (true) {
                    pq.waitForPacket();
                    IPacket p = pq.getPacket();
                    if (p instanceof JoinGamePacket) {
                        JoinGamePacket j = (JoinGamePacket) p;
                        net = j.getGameNetwork();
                        try {
                            if (secondjoin) {
                                net.send(new PlayerJoined(j.getName()));
                            } else {
                                secondjoin = true;
                                net.stop();
                            }
                        } catch (IOException e) {
                            fail(e.getMessage());
                        }
                    }
                }
            }
        }, "FakeServer");
        simserver.start();

        this.ps = ReaderFactory.initTestReader();
        this.pf = TestDataProvider.getPacketFactory();
        this.cr = ReaderFactory.getReader(pf);

        new ReaderFactory();

        assertEquals(pf, cr.getPacketFactory());

        ps.println("blub");
        ps.println("/ ");
        ps.println("/join");
        ps.println("/joinip");
        ps.println("/bet");
        ps.println("/joasfinip");

        ps.println("/join Knorke jhgfjh");
        ps.println("/join Knorke1");
        ps.println("/join Knorke2");
        ps.println("/join Knorke2");
        ps.println("/start");
        ps.println("/bet");
        ps.println("/bet a");
        ps.println("/bet 1 1");
        ps.println("/bet 1");
        ps.println("/bet 1 1");
        ps.println("/play");
        ps.println("/play Human 1");
        ps.println("/play 1 1");
        ps.println("/play Human blub");

        ps.println("/exit");

        cr.waitforexit();
        cr.reset();

        ps.println("/joinip 255.255.255.255 fail");
        ps.println("/joinip 127.0.0.1 knorke3 asdfsf");
        ps.println("/joinip localhost knorke3");
        ps.println("/joinip localhost knorke3");
        ps.println("/exit");
        cr.waitforexit();
        cl.interrupt();
        throw new UnsupportedOperationException();
    }