String name1 = "TypeError";
String message1 = "Whut?";
List<String> stack1 =
Lists.newArrayList("http://someweb.com:8080/static/asserts.js",
"http://someweb.com:8080//test/foo.js");
Failure failure1 =
new Failure(String.format("%s: %s", name1, message1), Lists.newArrayList(stack1.get(1)));
String name2 = "TypeError";
String message2 = "Thuw?";
List<String> stack2 =
Lists.newArrayList(
"http://someweb.com:8080/static/asserts.js",
"http://someweb.com:8080/test/foo.js",
"http://someweb.com:8080/test/static/foo.js",
"http://someweb.com:8080/test/baz.js");
Failure failure2 =
new Failure(String.format("%s: %s", name2, message2), Lists.newArrayList(stack2.get(1),
stack2.get(2), stack2.get(3)));
String jsonFailures =
gson.toJson(Lists.newArrayList(
new JsException(name1, message1, "doof.js", 1l, Joiner.on("\n").join(stack1)),