public void plusInPath() throws Exception {
final AtomicReference<String> path = new AtomicReference<>();
final ClassLoader jaasLoader = new URLClassLoader(new URL[0]) {
@Override
public Enumeration<URL> getResources(final String name) throws IOException {
return new ArrayEnumeration(asList(new URL("file:/tmp/jaas/folder+with+plus/login.config")));
}
};
Thread.currentThread().setContextClassLoader(jaasLoader);
try {
final Method mtd = SecurityServiceImpl.class.getDeclaredMethod("installJaas");