class SimpleApplicationManager implements ApplicationManager {

    @Override
    public Optional<Application> getApplication(String applicationId) {
        if (!applicationExists(applicationId)) {
            return Optional.empty();
        }
        return Optional.ofNullable(applications.get(applicationId).getApplication());
    }

}