@Test
    public void testReader() throws GuacamoleException {

        // Test string
        final String test = "1.a,2.bc,3.def,10.helloworld;4.test,5.test2;0.;3.foo;1.\uD83E\uDD79;";

        GuacamoleReader reader = new ReaderGuacamoleReader(new StringReader(test));

        GuacamoleInstruction instruction;

        // Validate first test instruction
        instruction = reader.readInstruction();
        assertNotNull(instruction);
        assertEquals(3, instruction.getArgs().size());
        assertEquals("a", instruction.getOpcode());
        assertEquals("bc", instruction.getArgs().get(0));
        assertEquals("def", instruction.getArgs().get(1));
        assertEquals("helloworld", instruction.getArgs().get(2));

        // Validate second test instruction
        instruction = reader.readInstruction();
        assertNotNull(instruction);
        assertEquals(1, instruction.getArgs().size());
        assertEquals("test", instruction.getOpcode());
        assertEquals("test2", instruction.getArgs().get(0));

        // Validate third test instruction
        instruction = reader.readInstruction();
        assertNotNull(instruction);
        assertEquals(0, instruction.getArgs().size());
        assertEquals("", instruction.getOpcode());

        // Validate fourth test instruction
        instruction = reader.readInstruction();
        assertNotNull(instruction);
        assertEquals(0, instruction.getArgs().size());
        assertEquals("foo", instruction.getOpcode());

        // Validate fifth test instruction
        instruction = reader.readInstruction();
        assertNotNull(instruction);
        assertEquals(0, instruction.getArgs().size());
        assertEquals("\uD83E\uDD79", instruction.getOpcode());    

        // There should be no more instructions
        instruction = reader.readInstruction();
        assertNull(instruction);

    }
Test of ReaderGuacamoleReader parsing.

@throws GuacamoleException If a parse error occurs while parsing the
                           known-good test string.
guacamole-common/src/test/java/org/apache/guacamole/io/ReaderGuacamoleReaderTest.java