class ApplicationService {

    public List<ApplicationContent> loadApplications() {
        List<ApplicationContent> applications = new ArrayList<>();
        List<Resource> applicationResources = applicationDiscovery.discoverApplications();
        try {
            for (Resource applicationResource : applicationResources) {
                try (InputStream inputStream = applicationResource.getInputStream()) {
                    applications.add(applicationReader.read(inputStream));
                }
            }
        } catch (IOException e) {
            throw new AppliationLoadException("Unable to load application resource", e);
        }
        return applications;
    }

    public  ApplicationService(ApplicationDiscovery applicationDiscovery,
                              ApplicationReader applicationReader);

}