Map<String, Object> map = new HashMap<String, Object>();
String path = "\"/content/geometrixx/en\",\"/content/geometrixx/en/toolbar\"";
String path1 = "/content/geometrixx/en/toolbar";
map.put("path", path);
// map.put("path1", path1);
ValueMap vm = new ValueMapDecorator(map);
when(resource.adaptTo(ValueMap.class)).thenReturn(vm);
when(resource.getResourceResolver()).thenReturn(resolver);
when(resolver.getResource(path)).thenReturn(res);
when(resolver.getResource(path1)).thenReturn(res1);
when(res.adaptTo(Page.class)).thenReturn(referredpage);