class DefaultApplicationSlaManagementService implements ApplicationSlaManagementService {

    @Override
    public Observable<Void> removeApplicationSLA(String applicationName) {
        if (applicationName.equals(DEFAULT_APPLICATION)) {
            return Observable.error(new IllegalArgumentException(DEFAULT_APPLICATION + " cannot be removed"));
        }
        // We trigger refresh, but not wait for the result, as we only care that first part (remove) succeeded.
        return storage.remove(applicationName).doOnCompleted(() -> capacityMonitoringService.refresh().subscribe());
    }

    @Inject public  DefaultApplicationSlaManagementService(CapacityMonitoringService capacityMonitoringService,
                                                  ApplicationSlaStore storage,
                                                  ManagementSubsystemInitializer initializer);

}