AppFrameworkServiceImpl extends BaseOpenmrsService implements AppFrameworkService { @Override public List<AppDescriptor> getAllApps() { return allAppDescriptors.getAppDescriptors(); } AppFrameworkServiceImpl(AllAppTemplates allAppTemplates, AllAppDescriptors allAppDescriptors,
	    AllFreeStandingExtensions allFreeStandingExtensions, AllComponentsState allComponentsState,
	    LocationService locationService, FeatureToggleProperties featureToggles, AppFrameworkConfig appFrameworkConfig,
	    AllUserApps allUserApps); @Override List<AppDescriptor> getAllApps(); @Override List<Extension> getExtensionsById(String extensionPointId, String id); @Override // TODO shouldn't this be getAllFreeStandingExtensions? List<Extension> getAllExtensions(String extensionPointId); @Override List<AppDescriptor> getAllEnabledApps(); @Override List<Extension> getAllEnabledExtensions(); @Override List<Extension> getAllEnabledExtensions(String extensionPointId); @Override void enableApp(String appId); @Override void disableApp(String appId); @Override void enableExtension(String extensionId); @Override void disableExtension(String extensionId); @Override List<Extension> getExtensionsForCurrentUser(); @Override List<Extension> getExtensionsForCurrentUser(String extensionPointId); @Override List<Extension> getExtensionsForCurrentUser(String extensionPointId, AppContextModel contextModel); @Override boolean checkRequireExpression(Requireable candidate, AppContextModel contextModel); @Override List<AppDescriptor> getAppsForCurrentUser(); @Override @Transactional(readOnly = true) List<Location> getLoginLocations(); @Override List<AppTemplate> getAllAppTemplates(); @Override AppTemplate getAppTemplate(String id); @Override AppDescriptor getApp(String id); @Override UserApp getUserApp(String appId); @Override List<UserApp> getUserApps(); @Override UserApp saveUserApp(UserApp userApp); @Override void purgeUserApp(UserApp userApp);  }
@Test public void testGetAllAppsAndIsSortedByOrder() throws Exception { List<AppDescriptor> allApps = service.getAllApps(); assertEquals(2, allApps.size()); assertEquals("app2", allApps.get(0).getId()); assertEquals("app1", allApps.get(1).getId()); }