@Test
    public void test() throws IOException, ClassNotFoundException {
        PrintStream ps = ReaderFactory.initTestReader();

        // Netzwerk initialisieren
        final PacketQueue pq = new PacketQueue();
        ConnectionListener cl = null;
        cl = new ConnectionListener(Settings.getPortNumber(), "", pq);

        Thread simserver = new Thread(new Runnable() {
            @Override
            public void run() {
                GameNetworkInterface net;
                IPacket p;
                do {
                    pq.waitForPacket();
                    p = pq.getPacket();
                    LOG.debug("Received Packet: " + p.getClass().getSimpleName());
                    if (p instanceof JoinGamePacket && ((JoinGamePacket) p).getName().equals("Knorke")) {
                        break;
                    }

                } while (p.getSender() == null);
                LOG.debug("Continue with server thread..." + p.getClass().getSimpleName());

                if (p instanceof JoinGamePacket) {
                    JoinGamePacket j = (JoinGamePacket) p;
                    net = j.getGameNetwork();
                    try {
                        net.send(new PlayerJoined(j.getName()));
                        net.send(new StartGamePacket(Strategy.Standard, 1));
                        net.send(new UnsupportedPacket());
                        net.send(new UpdateClient(TestDataProvider.getBettingTestUIData(), TestDataProvider.getSmallCardList()));
                        net.send(new UpdateClient(TestDataProvider.getPlayingTestUIData(), TestDataProvider.getSmallCardList()));
                        net.send(new EndGamePacket());
                    } catch (IOException e) {
                        fail("Could not send all Packets: " + e.getMessage());
                    }
                }
            }
        }, "FakeServer");

        simserver.start();

        fake("t1");
        fake("t2");
        fake("t3");
        fake("t4");
        fake("t5");

        ps.println("/join Knorke");
        ps.println("/start");

        try {
            Client c = new Client(new TextUserInterface(), new GUI());
            c.getPacketFactory();
            c.setError("TEST_ERROR", ErrorReason.TEST);
            c.setError("TEST_ERROR", ErrorReason.JOIN_NOT_POSSIBLE);
            c.setSuccess("TEST_SUCCESS");
        } catch (ClassNotFoundException e) {
            LOG.catching(e);
            fail();
        }

        simserver.interrupt();
        cl.interrupt();
    }