@Test
    public void testIdMessagingNoPush() {
        System.out.println("testIdMessagingNoPush");

        try {
            assertTrue(c.registerToServer(GlobalConstants.IP_LOOPBACK));
        } catch (Exception ex) {
            fail("Registration from client to server failed - " + ex);
        }

        final UUID id = UUID.randomUUID();
        final String msgToClient = "testDataToClient";
        final String msgToServer = "testDataToServer";
        final String msgHeader = "header";        

        final Queue<Identifiable> clientQueue = c.getListenerRegistrator().createIdMessageQueue(id);
        final Queue<Identifiable> serverQueue = s.getListenerRegistrator().createIdMessageQueue(id);

        try {
            Message m = new Message(id, msgHeader, msgToClient);
            assertEquals(GenericResponses.NOT_HANDLED_DIRECTLY, s.getClient(c.getLocalID()).sendData(m));
            assertEquals(1, clientQueue.size());
            Identifiable data = clientQueue.poll();
            if (data instanceof DataPacket) {
                DataPacket dp = (DataPacket) data;                
                assertEquals(m, dp.getData());
            } else {
                fail("Illegal data inside data packet.");
            }

            m = new Message(id, msgHeader, msgToServer);
            assertEquals(GenericResponses.NOT_HANDLED_DIRECTLY, c.getServerComm().sendData(m));
            assertEquals(1, serverQueue.size());
            data = serverQueue.poll();
            if (data instanceof DataPacket) {
                DataPacket dp = (DataPacket) data;
                assertEquals(m, dp.getData());
            } else {
                fail("Illegal data inside data packet.");
            }
        } catch (ConnectionException ex) {
            fail("Communication failed.");
        }

        c.getListenerRegistrator().removeIdListener(id);
        try {
            assertEquals(GenericResponses.NOT_HANDLED, s.getClient(c.getLocalID()).sendData(new Message(id, msgHeader, msgToClient)));
        } catch (ConnectionException ex) {
            Logger.getLogger(MessagingTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }