DataHubService { @Async public void installUserModules(HubConfig config, boolean forceLoad, DeployUserModulesListener deployListener, ValidateListener validateListener) { logger.info("Installing user modules"); long startTime = PerformanceLogger.monitorTimeInsideMethod(); try { installUserModules(config, forceLoad, deployListener); if (validateListener != null) { validateUserModules(config, validateListener); } } catch (Throwable e) { throw new DataHubException(e.getMessage(), e); } PerformanceLogger.logTimeInsideMethod(startTime, "DataHubService.installUserModules"); }  boolean install(HubConfig config, HubDeployStatusListener listener); void updateIndexes(HubConfig config); @Async void installUserModulesAsync(HubConfig config, boolean forceLoad, DeployUserModulesListener deployListener, ValidateListener validateListener); @Async void installUserModules(HubConfig config, boolean forceLoad, DeployUserModulesListener deployListener, ValidateListener validateListener); @Async void reinstallUserModules(HubConfig config, DeployUserModulesListener deployListener, ValidateListener validateListener); @Async void deleteDocument(String uri, DatabaseKind databaseKind); HashMap preInstallCheck(HubConfig config); @Async void validateUserModules(HubConfig hubConfig, ValidateListener validateListener); void uninstall(HubConfig config, HubDeployStatusListener listener); String getLastDeployed(HubConfig config); boolean updateHub(HubConfig config); void clearContent(HubConfig config, String database);  }
@Test public void testForceLoadUserModules() { dataHubService.installUserModules(hubConfig, true, null); Assertions.assertEquals(getResource("legacy-flow-manager/sjs-flow/headers.sjs"),getModulesFile("/custom-modules/headers.sjs"), "The module should be loaded"); Assertions.assertEquals(getResource("legacy-flow-manager/sjs-flow/content-input.sjs"),getModulesFile("/custom-modules/content-input.sjs"), "The module should be loaded"); String filePath = hubConfig.getAppConfig().getModuleTimestampsPath(); File defaultTimestampFile = new File(filePath); Assertions.assertTrue(defaultTimestampFile.exists()); }