in core/src/main/java/org/apache/sling/testing/mock/sling/context/UniqueRoot.java [65:74]
protected final Resource getOrCreateResource(@NotNull String path, @NotNull String primaryType) {
try {
return ResourceUtil.getOrCreateResource(context.resourceResolver(), path,
ImmutableValueMap.of(JcrConstants.JCR_PRIMARYTYPE, primaryType),
null, true);
}
catch (PersistenceException ex) {
throw new RuntimeException("Unable to create resource at " + path + ": " + ex.getMessage(), ex);
}
}