/*
 * Copyright (c) 2017 Arrow Electronics, Inc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License 2.0
 * which accompanies this distribution, and is available at
 * http://apache.org/licenses/LICENSE-2.0
 *
 * Contributors: Arrow Electronics, Inc.
 */

package com.arrow.acn.api.fakes;

import com.arrow.acn.api.SenderServiceFactory;
import com.arrow.acn.api.TelemetrySenderInterface;
import com.arrow.acn.api.common.RetrofitHolder;
import com.arrow.acn.api.listeners.ServerCommandsListener;
import com.arrow.acn.api.models.ConfigResponse;

/**
 * Created by osminin on 4/5/2017.
 */

public final class FakeSenderServiceFactory implements SenderServiceFactory {

    @Override
    public TelemetrySenderInterface createTelemetrySender(RetrofitHolder retrofitHolder,
                                                          ConfigResponse configResponse,
                                                          String gatewayUid, String gatewayId,
                                                          String mqttHost, String mqttPrefix,
                                                          ServerCommandsListener serverCommandsListener) {
        TelemetrySenderInterface sender = new FakeTelemetrySender(retrofitHolder, configResponse, gatewayUid, gatewayId,
                mqttHost, mqttPrefix, serverCommandsListener);
        return sender;
    }
}

@@ -359,16 +359,68 @@
 fakes;%0A%0A
+import com.arrow.acn.api.SenderServiceArgsProvider;%0A
 import c
@@ -458,16 +458,16 @@
 actory;%0A
-
 import c
@@ -864,113 +864,171 @@
 der(
-RetrofitHolder retrofitHolder,%0A                                                          ConfigResponse c
+SenderServiceArgsProvider provider) %7B%0A        TelemetrySenderInterface sender = new FakeTelemetrySender(provider.getRetrofitHolder(),%0A                provider.getC
 onfi
@@ -1036,16 +1036,18 @@
 Response
+()
 ,%0A      
@@ -1060,85 +1060,32 @@
     
-                                          String gatewayUid, String g
+provider.getG
 ateway
-Id
+Uid()
 ,%0A  
@@ -1102,353 +1102,144 @@
     
-                                          String mqttHost, String mqttPrefix,%0A                                                          ServerCommandsListener serverCommandsListener) %7B%0A        TelemetrySenderInterface sender = new FakeTelemetrySender(retrofitHolder, configResponse, gatewayUid, gatewayId,%0A                mqttHost, mqttPrefix, s
+provider.getGatewayId(),%0A                provider.getMqttHost(),%0A                provider.getMqttPrefix(),%0A                provider.getS
 erve
@@ -1255,16 +1255,18 @@
 Listener
+()
 );%0A     

fix for tests