{ "/edit/default", Constants.EDIT_WORKSPACE, Locale.ENGLISH, "/", JCRNodeWrapper.class, "/" },
{ "/edit/default/en", Constants.EDIT_WORKSPACE, Locale.ENGLISH, "/", JCRNodeWrapper.class, "/" },
{ "/edit/default/fr", Constants.EDIT_WORKSPACE, Locale.FRENCH, "/", JCRNodeWrapper.class, "/" },
{ "/edit/default/fr/sites/test/home.html", Constants.EDIT_WORKSPACE, Locale.FRENCH, "/sites/test/home.html", JCRNodeWrapper.class, "/sites/test/home" }, };
for (Object[] testPath : testPathes) {
URLResolver urlResolver = getUrlResolverFactory().createURLResolver((String) testPath[0], "", (HttpServletRequest) new MockHttpServletRequest("GET",(String) testPath[0]));
urlResolver.setSiteKey(TESTSITE_NAME);
assertTrue("Path " + testPath[0] + " not resolved correctly",
testPath[1].equals(urlResolver.getWorkspace())
&& testPath[2].equals(urlResolver.getLocale())
&& testPath[3].equals(urlResolver.getPath()));
Object nodeObject = null;
String path = null;
try {
nodeObject = urlResolver.getNode();
path = ((JCRNodeWrapper) nodeObject).getPath();
} catch (Exception e) {
nodeObject = e;
path = "";
}