All of the test apps following the same naming convention. We can build the class names

@param app1 - test app 1
@param app2 - test app 2
@param app3 - test app 3 if it exists
@return
@throws Exception
978769
public List<String> createAppClassListBuildAppNames(String app1, String app2, String app3) throws Exception {

        List<String> classList = createAppClassListBuildAppNames(app1, app2);
        classList.add("com.ibm.ws.jaxrs.fat.microProfileApp." + app2 + ".MicroProfileApp" + app3);
        return classList;

    }
1344203
@Override
	public HashMap<String, Object> getApplicationMap() {
		return (HashMap<String, Object>) JKThreadLocal.getValue(JKContextConstants.APPLICATION_MAP);
	}
638339
public void configureWebApp() throws Exception
    {
        //cannot configure if the context is already started
        if (_context.isStarted())
        {
            if (log.isDebugEnabled()){log.debug("Cannot configure webapp after it is started");};
            return;
        }
        
        Resource webInf=getWebApplicationContext().getWebInf();
        // handle any WEB-INF descriptors
        if(webInf!=null&&webInf.isDirectory())
        {
            // do web.xml file
            Resource web=webInf.addPath("web.xml");
            if(!web.exists())
            {
                log.info("No WEB-INF/web.xml in "+getWebApplicationContext().getWAR()
                        +". Serving files and default/dynamic servlets only");
            }
            else
            {
                XmlParser.Node config=null;
                config=xmlParser.parse(web.getURL());
                initialize(config);
            }
        }
    }
494198
@SuppressWarnings({ "rawtypes", "unchecked" })
    public void start() throws Exception {
        factory =
            new DefaultWebApplicationFactory(bundleContext, applicationClass, applicationName, mountPoint,
                contextParams);
        factory.register();
        LOGGER.info("Successfully registered application factory");
    }
1250485
protected void setApplicationObject() {
        try {
            Object app = createApplication();
            context.setAttribute(APP, app);
            initializer.set(app);
        } catch (Error e) {
            LOGGER.log(Level.SEVERE, "Failed to initialize "+getApplicationName(),e);
            initializer.setException(e);
            throw e;
        } catch (RuntimeException e) {
            LOGGER.log(Level.SEVERE, "Failed to initialize "+getApplicationName(),e);
            initializer.setException(e);
            throw e;
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Failed to initialize "+getApplicationName(),e);
            initializer.setException(e);
            throw new Error(e);
        } finally {
            // in case the above catch clauses miss this.
            if (!initializer.isDone())
                initializer.cancel(true);
        }
    }
481631
public static ConfigurableApplicationContext start(Class<?> app, String... args) {
        return start(new Class<?>[]{app}, args);
    }
910160
public List<I_CmsWorkplaceAppConfiguration> getAppConfigurations(String... appIds) {

        List<I_CmsWorkplaceAppConfiguration> result = new ArrayList<I_CmsWorkplaceAppConfiguration>();
        for (int i = 0; i < appIds.length; i++) {
            I_CmsWorkplaceAppConfiguration config = getAppConfiguration(appIds[i]);
            if (config != null) {
                result.add(config);
            }
        }
        return result;
    }
258990
private void initScriptClasses(Set<Class<?>> classes)throws Exception
	{
		Set<Class<? extends S>> scriptClass=findScriptClass(classes);
		Set<Class<? extends S>> instanceAbleScript = findInstanceAbleScript(scriptClass);
		Map<String, Class<? extends S>> nameMap_ = new HashMap<String, Class<? extends S>>();
		Map<Integer, Class<? extends S>> idMap_ = new HashMap<Integer, Class<? extends S>>();
		for(Class<? extends S> clazz:instanceAbleScript)
		{
			registScript(clazz, nameMap_, idMap_);
		}
		this.idMap.clear();
		this.nameMap.clear();
		this.idMap.putAll(idMap_);
		this.nameMap.putAll(nameMap_);
		_log.info("loadScriptClass complete,id mapping size:"+idMap.size()+",name mapping size:"+nameMap.size());
	}
999903
public final void setApplicationName(String... applicationNames) {
        synchronized (lock) {
            if (applicationNames == null) {
                serviceProperties.remove(APPLICATION_NAME);
            } else {
                serviceProperties.put(APPLICATION_NAME, applicationNames);
            }

            if (serviceRegistration != null) {
                serviceRegistration.setProperties(serviceProperties);
            }
        }
    }
1333536
public void setApps(java.util.Collection<App> apps) {
        if (apps == null) {
            this.apps = null;
            return;
        }

        this.apps = new com.amazonaws.internal.SdkInternalList<App>(apps);
    }
945926
private void processApplicationReferences(EARApplicationInfo appInfo, Application app) throws StateChangeException {
        Map<JNDIEnvironmentRefType, List<? extends JNDIEnvironmentRef>> allRefs =
                        new EnumMap<JNDIEnvironmentRefType, List<? extends JNDIEnvironmentRef>>(JNDIEnvironmentRefType.class);
        boolean anyRefs = false;
        for (JNDIEnvironmentRefType refType : JNDIEnvironmentRefType.VALUES) {
            List<? extends JNDIEnvironmentRef> refs = refType.getRefs(app);
            allRefs.put(refType, refs);
            anyRefs |= !refs.isEmpty();
        }

        if (anyRefs) {
            ApplicationBnd appBnd;
            try {
                appBnd = appInfo.getContainer().adapt(ApplicationBnd.class);
            } catch (UnableToAdaptException e) {
                throw new StateChangeException(e);
            }

            String compNSConfigName = appInfo.getName() + " META-INF/application.xml";
            ComponentNameSpaceConfiguration compNSConfig = new ComponentNameSpaceConfiguration(compNSConfigName, ((ExtendedApplicationInfo) appInfo).getMetaData().getJ2EEName());
            compNSConfig.setClassLoader(appInfo.getApplicationClassLoader());
            compNSConfig.setApplicationMetaData(((ExtendedApplicationInfo) appInfo).getMetaData());

            JNDIEnvironmentRefType.setAllRefs(compNSConfig, allRefs);

            if (appBnd != null) {
                Map<JNDIEnvironmentRefType, Map<String, String>> allBindings = JNDIEnvironmentRefBindingHelper.createAllBindingsMap();
                Map<String, String> envEntryValues = new HashMap<String, String>();
                ResourceRefConfigList resourceRefConfigList = resourceRefConfigFactory.createResourceRefConfigList();
                OSGiJNDIEnvironmentRefBindingHelper.processBndAndExt(allBindings, envEntryValues, resourceRefConfigList, appBnd, null);
                JNDIEnvironmentRefBindingHelper.setAllBndAndExt(compNSConfig, allBindings, envEntryValues, resourceRefConfigList);
            }

            try {
                processInjectionMetaData(null, compNSConfig);
            } catch (InjectionException e) {
                throw new StateChangeException(e);
            }
        }
    }
828277
public static void loadApplicationBindings( Application app ) {

		File descDir = new File( app.getDirectory(), Constants.PROJECT_DIR_DESC );
		File appBindingsFile = new File( descDir, APP_BINDINGS_FILE );

		Logger logger = Logger.getLogger( ConfigurationUtils.class.getName());
		Properties props = Utils.readPropertiesFileQuietly( appBindingsFile, logger );
		for( Map.Entry<?,?> entry : props.entrySet()) {
			for( String part : Utils.splitNicely((String) entry.getValue(), "," )) {
				if( ! Utils.isEmptyOrWhitespaces( part ))
					app.bindWithApplication((String) entry.getKey(), part );
			}
		}
	}
1231674
@Override
    public void initializeApplication(ApplicationDefinition oldAppDef,
                                      ApplicationDefinition appDef) {
        checkServiceState();
        verifyApplicationCFs(oldAppDef, appDef);
    }
670526
private void list() throws IOException {
    LOG.log(Level.FINE, "Listing applications");
    final List<ApplicationState> applications = this.hdInsightInstance.listApplications();
    for (final ApplicationState appState : applications) {
      if (appState.getState().equals("RUNNING")) {
        System.out.println(appState.getId() + "\t" + appState.getName());
      }
    }
  }
701821
@Override
    public Set<AppdynamicsApplication> getApplications(String instanceUrl) {
        Set<AppdynamicsApplication> returnSet = new HashSet<>();
        try {
            String url = joinURL(instanceUrl, APPLICATION_LIST_PATH);
            ResponseEntity<String> responseEntity = makeRestCall(url);
            String returnJSON = responseEntity.getBody();
            JSONParser parser = new JSONParser();

            try {
                JSONArray array = (JSONArray) parser.parse(returnJSON);

                for (Object entry : array) {
                    JSONObject jsonEntry = (JSONObject) entry;

                    String appName = getString(jsonEntry, "name");
                    String appId = String.valueOf(getLong(jsonEntry, "id"));
                    String desc = getString(jsonEntry, "description");
                    if (StringUtils.isEmpty(desc)) {
                        desc = appName;
                    }
                    AppdynamicsApplication app = new AppdynamicsApplication();
                    app.setAppID(appId);
                    app.setAppName(appName);
                    app.setAppDesc(desc);
                    app.setDescription(desc);
                    returnSet.add(app);
                }
            } catch (ParseException e) {
                LOG.error("Parsing applications on instance: " + instanceUrl, e);
            }
        } catch (RestClientException rce) {
            LOG.error("client exception loading applications", rce);
            throw rce;
        } catch (MalformedURLException mfe) {
            LOG.error("malformed url for loading applications", mfe);
        }
        return returnSet;
    }
930988
public void loadApps() {

        m_appsById.clear();
        m_appCategories = loadCategories();
        addAppConfigurations(loadDefaultApps());
        addAppConfigurations(loadAppsUsingServiceLoader());
        addAppConfigurations(loadLegacyApps());
    }
882119
protected Configuration[] loadConfigurations() throws Exception
    {
        String[] names = _configurationClassNames;
        
        //if this webapp does not have its own set of configurators, use the defaults
        if (null==names)
            names = ((Server)getHttpServer()).getWebApplicationConfigurationClassNames();
        
        if (null!=names)
        {
            //instantiate instances for each
            Object[] nullArgs = new Object[0];
            Configuration[] configurations = new Configuration[names.length];
            for (int i=0; i< names.length; i++)
            {
                configurations[i] =
                    (Configuration)Loader.loadClass(WebApplicationContext.class, names[i]).getConstructors()[0].newInstance(nullArgs);
                if (log.isDebugEnabled()){log.debug("Loaded instance of "+names[i]);};
            }
            return configurations;
        }
        else
            return new Configuration[0];
    }