@Test
public void piping() {

    {
        final CommandParser.Command[] args = new CommandParser().toArgs("a|b");
        assertEquals(2, args.length);
        assertEquals(singletonList("a"), asList(args[0].getArgs()));
        assertEquals(singletonList("b"), asList(args[1].getArgs()));
    }
    {
        final CommandParser.Command[] args = new CommandParser().toArgs("test --option=value \"-quoted=ckdwc\\\\cekwcbw\" | grep \"==foo\"");
        assertEquals(2, args.length);
        assertEquals(asList("test", "--option=value", "-quoted=ckdwc\\cekwcbw"), asList(args[0].getArgs()));
        assertEquals(asList("grep", "==foo"), asList(args[1].getArgs()));
    }
}