Example #1
0
 @Test
 public void testJSONHeader() throws Exception {
   HashMap<String, List<String>> vals = new HashMap<String, List<String>>();
   BinaryWSProcedureExecution.parseHeader(vals, new ClobImpl("{\"a\":1, \"b\":[\"x\",\"y\"]}"));
   assertEquals(2, vals.size());
   assertEquals(vals.get("b"), Arrays.asList("x", "y"));
   assertEquals(vals.get("a"), Arrays.asList("1"));
 }
Example #2
0
 @Test(expected = TranslatorException.class)
 public void testJSONHeaderInvalid() throws Exception {
   HashMap<String, List<String>> vals = new HashMap<String, List<String>>();
   BinaryWSProcedureExecution.parseHeader(vals, new ClobImpl("[]"));
 }