in src/main/java/org/apache/sling/testing/mock/jcr/MockSession.java [74:86]
public MockSession(MockRepository repository, Map<String, ItemData> items,
String userId, String workspaceName) throws RepositoryException {
this.repository = repository;
this.workspace = new MockWorkspace(repository, this, workspaceName);
this.userManager = new MockUserManager(this);
this.principalManager = new MockPrincipalManager(this.userManager);
this.items = items;
this.userId = userId;
isLive = true;
this.userManager.loadAlreadyExistingAuthorizables();
hasKnownChanges = false;
this.save();
}