use of org.apache.jackrabbit.core.SessionImpl in project pentaho-platform by pentaho.
the class MagicAceDefinitionTest method parseYamlFile.
private List<MagicAceDefinition> parseYamlFile(String filePath) throws Exception {
SessionImpl mockSessionImpl = mock(SessionImpl.class);
AccessControlManager mockAccessControlManager = mock(AccessControlManager.class);
Privilege mockPrivilege = mock(Privilege.class);
when(mockSessionImpl.getAccessControlManager()).thenReturn(mockAccessControlManager);
when(mockAccessControlManager.privilegeFromName(any())).thenReturn(mockPrivilege);
InputStream input = new FileInputStream(new File(filePath));
return MagicAceDefinition.parseYamlMagicAceDefinitions(input, mockSessionImpl);
}
Aggregations