public void testRawDatagram() throws Exception {
        Selector sel = Selector.open();
        DatagramChannel peer1 = DatagramChannel.open();
        DatagramChannel peer2 = DatagramChannel.open();
        
        int port1 = 19858;
        int port2 = 19533;
        InetSocketAddress peer1Addr = new InetSocketAddress(port1);
        InetSocketAddress peer2Addr = new InetSocketAddress(port2);
        
        //NOTE: replace the above with the following and this test will fail on linux
        //InetSocketAddress peer1Addr = new InetSocketAddress(host, 0);
        //InetSocketAddress peer2Addr = new InetSocketAddress(host, 0);
        
        peer1.configureBlocking(false);
        peer2.configureBlocking(false);

        Object o = new Object();
        peer1.register(sel, SelectionKey.OP_READ, o);
        peer2.register(sel, SelectionKey.OP_READ, o);
        
        peer1.socket().bind(peer1Addr);
        peer2.socket().bind(peer2Addr);
        
        InetAddress localHost = InetAddress.getLocalHost();
        peer1Addr = new InetSocketAddress(localHost, port1);
        peer2Addr = new InetSocketAddress(localHost, port2);
        peer1.connect(peer2Addr);
        peer2.connect(peer1Addr);
        
        String msg = "Asfdsf";
        sendMessage(peer1, peer2, msg);
        
        peer1.disconnect();
        
        String msg2 = "shouldBedropped";
        writePacket(peer2, msg2);
        Thread.sleep(1000);
        
        peer1.connect(peer2Addr);
        
        sel.select(10000);
        
        sendMessage(peer1, peer2, msg2);        
    }