@Test
public void testParsingVariableAndJsonPath() {

    assertEquals(StringUtils.pair("foo", "$"), Script.parseVariableAndPath("foo"));
    assertEquals(StringUtils.pair("foo", "$.bar"), Script.parseVariableAndPath("foo.bar"));
    assertEquals(StringUtils.pair("foo", "$['bar']"), Script.parseVariableAndPath("foo['bar']"));
    assertEquals(StringUtils.pair("foo", "$[0]"), Script.parseVariableAndPath("foo[0]"));
    assertEquals(StringUtils.pair("foo", "$[0].bar"), Script.parseVariableAndPath("foo[0].bar"));
    assertEquals(StringUtils.pair("foo", "$[0]['bar']"), Script.parseVariableAndPath("foo[0]['bar']"));
    assertEquals(StringUtils.pair("foo", "/bar"), Script.parseVariableAndPath("foo/bar"));
    assertEquals(StringUtils.pair("foo", "/"), Script.parseVariableAndPath("foo/"));
    assertEquals(StringUtils.pair("foo", "/bar/baz[1]/ban"), Script.parseVariableAndPath("foo/bar/baz[1]/ban"));
}