### Question:
JsonPointerUtil { public static String decode(String s) { if (s == null || s.length() == 0) { return s; } return replace(replace(s, "~1", "/"), "~0", "~"); } private  JsonPointerUtil(); static String encode(String s); static String decode(String s);  }### Answer:
@Test public void testDecodeNull() { assertNull(JsonPointerUtil.decode(null)); }
@Test public void testDecodeEmptyString() { String decodedString = JsonPointerUtil.decode(""); assertEquals("", decodedString); }
@Test public void testDecodeNoTransformation() { String decodedString = JsonPointerUtil.decode("TestString"); assertEquals("TestString", decodedString); }
@Test public void testDecodeFirstTransformation() { String decodedString = JsonPointerUtil.decode("~1"); assertEquals("/", decodedString); }
@Test public void testDecodeSecondTransformation() { String decodedString = JsonPointerUtil.decode("~0"); assertEquals("~", decodedString); }
@Test public void testDecodeWholeTransformation() { String decodedString = JsonPointerUtil.decode("~01"); assertEquals("~1", decodedString); }