resolver = rrFactory.getAdministrativeResourceResolver(null);
Session session = resolver.adaptTo(Session.class);
Node rootNode = session.getRootNode();
createdNode = rootNode.addNode("test_" + RandomStringUtils.randomAlphanumeric(10));
createdNode.setProperty("testProperty", value);
session.save();
Resource resource = resolver.getResource(createdNode.getPath());
SourceObject obj = new SourceObject(resource);
ViaModel model = adapterManager.getAdapter(obj, ViaModel.class);