Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/982#discussion_r214640708
--- Diff:
utils/common/src/test/java/org/apache/brooklyn/util/text/StringEscapesTest.java
---
@@ -115,4 +117,80 @@ public void testJavaLists() {
JavaStringEscapes.unwrapJsonishListIfPossible("\"\",,x,\"\""));
}
+ @Test
+ public void testJavaListString() {
+ Assert.assertEquals(MutableList.of("hello", "world"),
+ JavaStringEscapes.unwrapQuotedJavaStringList("\"hello\",
\"world\"", ","));
+ try {
+ JavaStringEscapes.unwrapQuotedJavaStringList("\"hello\",
world", ",");
+ Assert.fail("Should have thrown");
+ } catch (Exception e) { /* expected */ }
+
+ Assert.assertEquals(MutableList.of("hello", "world"),
--- End diff --
These assert calls are the wrong way round - first argument is `actual`,
second argument is `expected` for testng.
---