use of org.apache.jackrabbit.oak.spi.security.authentication.token.TokenInfo in project jackrabbit-oak by apache.
the class TokenProviderImplTest method testGetTokenInfoFromInvalidLocation2.
@Test
public void testGetTokenInfoFromInvalidLocation2() throws Exception {
TokenInfo info = tokenProvider.createToken(userId, Collections.<String, Object>emptyMap());
Tree tokenTree = getTokenTree(info);
assertNotNull(tokenProvider.getTokenInfo(info.getToken()));
Tree userTree = root.getTree(getUserManager(root).getAuthorizable(userId).getPath());
NodeUtil node = new NodeUtil(userTree).addChild("testNode", JcrConstants.NT_UNSTRUCTURED);
try {
createTokenTree(info, node, TOKEN_NT_NAME);
tokenTree.remove();
assertNull(tokenProvider.getTokenInfo(info.getToken()));
} finally {
root.refresh();
}
}
Aggregations