    @Test
    public void cli() throws IOException {

        String p = createTestProps("port=8577","9999:other.json");
        String[] data = new String[] {
                p,"port=8577","9999:other.json",
                p + ",jmx_exporter{{567:config.json}}","port=8577","567:config.json",
                "jmx_exporter{{567:config.json}}," + p,"port=8577","567:config.json",
                "jolokia{{port=1234,host=localhost}},jmx_exporter{{567:config.json}}","port=1234,host=localhost","567:config.json",
                "jolokia{{port=1234,host=localhost}}", "port=1234,host=localhost", null,
        };
        for (int i = 0; i < data.length; i += 3) {
            AgentConfiguration config = new AgentConfiguration(agentIds,data[i]);
            assertEquals(data[i+1],config.getArgs("jolokia"));
            assertEquals(data[i+2],config.getArgs("jmx_exporter"));
        }
    }