@Nullable
    public static Resource getJsBundleResource(PluginManager pluginManager, String pluginName,
        String bundleName) {
        Assert.hasText(pluginName, "The pluginName must not be blank");
        Assert.hasText(bundleName, "Bundle name must not be blank");

        DefaultResourceLoader resourceLoader = getResourceLoader(pluginManager, pluginName);
        if (resourceLoader == null) {
            return null;
        }
        String path = PathUtils.combinePath(CONSOLE_BUNDLE_LOCATION, bundleName);
        String simplifyPath = StringUtils.cleanPath(path);
        FileUtils.checkDirectoryTraversal("/" + CONSOLE_BUNDLE_LOCATION, simplifyPath);
        Resource resource = resourceLoader.getResource(simplifyPath);
        return resource.exists() ? resource : null;
    }
@Test
    void getJsBundleResource() {
        Resource jsBundleResource =
            BundleResourceUtils.getJsBundleResource(pluginManager, "fake-plugin", "main.js");
        assertThat(jsBundleResource).isNotNull();
        assertThat(jsBundleResource.exists()).isTrue();

        jsBundleResource =
            BundleResourceUtils.getJsBundleResource(pluginManager, "fake-plugin", "test.js");
        assertThat(jsBundleResource).isNull();

        jsBundleResource =
            BundleResourceUtils.getJsBundleResource(pluginManager, "nothing-plugin", "main.js");
        assertThat(jsBundleResource).isNull();

        assertThatThrownBy(() -> {
            BundleResourceUtils.getJsBundleResource(pluginManager, "fake-plugin",
                "../test/main.js");
        }).isInstanceOf(AccessDeniedException.class);
    }