@BeforeClass
public static void init() throws Exception {
rrf = mock(ResourceResolverFactory.class);
when(rrf.getAdministrativeResourceResolver(null)).thenAnswer(new Answer<ResourceResolver>() {
public ResourceResolver answer(InvocationOnMock invocation) throws Throwable {
return new MockedResourceResolver();
}
});
ResourceResolver rr = rrf.getAdministrativeResourceResolver(null);
if (rr != null) {
appsValidatorsRoot = ResourceUtil.getOrCreateResource(rr, APPS + "/" + VALIDATION_MODELS_RELATIVE_PATH, (Map) null,