ObjectNames { static List<String> getPropertyValues(ObjectName objectName) { return new ObjectNameParser(objectName).getPropertyValues(); } private  ObjectNames();   }
@Test public void shouldHandleQuotes() throws Exception { List<String> keyValuePairs = ObjectNames .getPropertyValues(ObjectName.getInstance("Glowroot:a=x,b=y,c=\"z,z,z\"")); assertThat(keyValuePairs).containsExactly("x", "y", "z,z,z"); }
@Test public void shouldHandleBackslashes() throws Exception { List<String> keyValuePairs = ObjectNames .getPropertyValues(ObjectName.getInstance("Glowroot:a=x,b=y\\y,c=\"z\\nz\\\"\"")); assertThat(keyValuePairs).containsExactly("x", "y\\y", "z\nz\""); }