@Test
    public void testLoadSave() {
        ZMsg msg = new ZMsg();
        for (int i = 0; i < 10; i++)
            msg.addString("Frame" + i);

        try {
            // Save msg to a file
            File f = new File("zmsg.test");
            DataOutputStream dos = new DataOutputStream(new FileOutputStream(f));
            assertTrue(ZMsg.save(msg, dos));
            dos.close();

            // Read msg out of the file
            DataInputStream dis = new DataInputStream(new FileInputStream(f));
            ZMsg msg2 = ZMsg.load(dis);
            dis.close();
            f.delete();

            assertEquals(10, msg2.size());
            assertEquals(60, msg2.contentSize());

        } catch (FileNotFoundException e) {
            e.printStackTrace();
            assertTrue(false);
        } catch (IOException e) {
            e.printStackTrace();
            assertTrue(false);
        }
    }