/*
 * Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
 * and other contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.hawkular.metrics.core.impl;

import java.util.Set;

import org.hawkular.metrics.tasks.api.Task;
import org.hawkular.metrics.tasks.api.TaskService;
import org.hawkular.metrics.tasks.api.TaskType;
import org.joda.time.DateTime;
import rx.Observable;

/**
 * @author jsanda
 */
public class FakeTaskService implements TaskService {

    @Override
    public void start() {
    }

    @Override
    public void shutdown() {
    }

    @Override
    public Observable<Task> scheduleTask(DateTime time, Task task) {
        return Observable.just(new Task() {
            @Override
            public TaskType getTaskType() {
                return task.getTaskType();
            }

            @Override
            public String getTenantId() {
                return task.getTenantId();
            }

            @Override
            public String getTarget() {
                return task.getTarget();
            }

            @Override
            public Set<String> getSources() {
                return task.getSources();
            }

            @Override
            public int getInterval() {
                return task.getInterval();
            }

            @Override
            public int getWindow() {
                return task.getWindow();
            }

            @Override
            public DateTime getTimeSlice() {
                return time;
            }
        });
    }
}

@@ -935,16 +935,69 @@
 ervable;
+%0Aimport rx.Subscription;%0Aimport rx.functions.Action1;
 %0A%0A/**%0A *
@@ -2145,11 +2145,138 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public Subscription subscribe(TaskType taskType, Action1%3C? super Task%3E onNext) %7B%0A        return null;%0A    %7D
 %0A%7D%0A

fix compile error