// Path: ailib/src/main/java/ai/api/android/AIConfiguration.java
// public class AIConfiguration extends ai.api.AIConfiguration {
//     public enum RecognitionEngine {
// 
//         /**
//          * Google Speech Recognition integrated into Android OS
//          *
//          * @deprecated Use System instead
//          */
//         @Deprecated
//         Google,
// 
//         /**
//          * Default system recognition
//          */
//         System,
// 
//         /**
//          * Speaktoit recognition engine
//          *
//          * @deprecated Use System instead
//          * will be support until 01.02.2017
//          */
//         @Deprecated
//         Speaktoit
//     }
// 
//     private final RecognitionEngine recognitionEngine;
// 
//     /**
//      * Speaktoit recognition start sound resouce descriptor
//      */
//     private AssetFileDescriptor recognizerStartSound;
// 
//     /**
//      * Speaktoit recognition stop sound resouce descriptor
//      */
//     private AssetFileDescriptor recognizerStopSound;
// 
//     /**
//      * Speaktoit recognition cancel sound resource descriptor
//      */
//     private AssetFileDescriptor recognizerCancelSound;
// 
//     private boolean voiceActivityDetectionEnabled = true;
// 
//     private boolean normalizeInputSound = false;
// 
//     public AIConfiguration(final String clientAccessToken, final SupportedLanguages language, final RecognitionEngine recognitionEngine) {
//         super(clientAccessToken, language);
// 
//         this.recognitionEngine = recognitionEngine;
// 
//         if (recognitionEngine == RecognitionEngine.Speaktoit
//                 && language == SupportedLanguages.Korean) {
//             throw new UnsupportedOperationException("Only System recognition supported for Korean language");
//         }
//     }
// 
//     public RecognitionEngine getRecognitionEngine() {
//         return recognitionEngine;
//     }
// 
//     public boolean isVoiceActivityDetectionEnabled() {
//         return voiceActivityDetectionEnabled;
//     }
// 
//     /**
//      * With setting this field to false you can disable voice activity detection for Speaktoit recognition.
//      * This option does not affect System recognition.
//      * @param voiceActivityDetectionEnabled
//      */
//     public void setVoiceActivityDetectionEnabled(final boolean voiceActivityDetectionEnabled) {
//         this.voiceActivityDetectionEnabled = voiceActivityDetectionEnabled;
//     }
// 
//     /**
//      * With setting this field to true you can enable sound amplification if it's too quiet. This option improves recognition quality on some devices.
//      * This option does not affect System recognition.
//      * @param normalizeInputSound
//      */
//     public void setNormalizeInputSound(final boolean normalizeInputSound) {
//         this.normalizeInputSound = normalizeInputSound;
//     }
// 
//     public boolean isNormalizeInputSound() {
//         return normalizeInputSound;
//     }
// 
//     public AssetFileDescriptor getRecognizerStartSound() {
//         return recognizerStartSound;
//     }
// 
//     public void setRecognizerStartSound(final AssetFileDescriptor recognizerStartSound) {
//         this.recognizerStartSound = recognizerStartSound;
//     }
// 
//     public AssetFileDescriptor getRecognizerStopSound() {
//         return recognizerStopSound;
//     }
// 
//     public void setRecognizerStopSound(final AssetFileDescriptor recognizerStopSound) {
//         this.recognizerStopSound = recognizerStopSound;
//     }
// 
//     public AssetFileDescriptor getRecognizerCancelSound() {
//         return recognizerCancelSound;
//     }
// 
//     public void setRecognizerCancelSound(final AssetFileDescriptor recognizerCancelSound) {
//         this.recognizerCancelSound = recognizerCancelSound;
//     }
// }
// 
// Path: ailib/src/main/java/ai/api/android/AIDataService.java
// public class AIDataService extends ai.api.AIDataService {
// 
// 
//     public static final String TAG = AIDataService.class.getName();
// 
//     @NonNull
//     private final Context context;
// 
//     @NonNull
//     private final AIConfiguration config;
// 
//     @NonNull
//     private final Gson gson = GsonFactory.getGson();
// 
//     public AIDataService(@NonNull final Context context, @NonNull final AIConfiguration config) {
//         super(config, new AIAndroidServiceContext(context));
//         this.context = context;
//         this.config = config;
//     }
// 
//     private static class AIAndroidServiceContext implements AIServiceContext {
// 
//         private final String sessionId;
// 
//         public AIAndroidServiceContext(final Context context) {
//             sessionId = SessionIdStorage.getSessionId(context);
//         }
// 
//         public String getSessionId() {
//             return sessionId;
//         }
// 
//         public TimeZone getTimeZone() { return TimeZone.getDefault(); }
//     }
// }


import ai.api.model.AIContext;
import ai.api.model.AIRequest;
import ai.api.model.AIResponse;
import static org.junit.Assert.assertEquals;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import java.util.Collections;
import java.util.List;
import ai.api.android.AIConfiguration;
import ai.api.android.AIDataService;
import ai.api.AIServiceException;
import ai.api.BuildConfig;
/**
 * Copyright 2017 Google Inc. All Rights Reserved.
 *
 * 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 ai.api.test.compatibility;





/**
 * Test for backward compatibility to the first protocol version ("20150415")
 */
@Config(constants = BuildConfig.class, manifest = Config.NONE, sdk = BuildConfig.TESTS_SDK)
@RunWith(RobolectricTestRunner.class)
@Ignore
public class V20150415ProtocolTest {
    private static final String PROTOCOL_VERSION = "20150415";

    @Test
    public void legacyContextsWithoutParametersTest() throws AIServiceException {
        final AIConfiguration config = new AIConfiguration(
                "3485a96fb27744db83e78b8c4bc9e7b7",
                AIConfiguration.SupportedLanguages.English,
// Path: ailib/src/main/java/ai/api/android/AIConfiguration.java
// public class AIConfiguration extends ai.api.AIConfiguration {
//     public enum RecognitionEngine {
// 
//         /**
//          * Google Speech Recognition integrated into Android OS
//          *
//          * @deprecated Use System instead
//          */
//         @Deprecated
//         Google,
// 
//         /**
//          * Default system recognition
//          */
//         System,
// 
//         /**
//          * Speaktoit recognition engine
//          *
//          * @deprecated Use System instead
//          * will be support until 01.02.2017
//          */
//         @Deprecated
//         Speaktoit
//     }
// 
//     private final RecognitionEngine recognitionEngine;
// 
//     /**
//      * Speaktoit recognition start sound resouce descriptor
//      */
//     private AssetFileDescriptor recognizerStartSound;
// 
//     /**
//      * Speaktoit recognition stop sound resouce descriptor
//      */
//     private AssetFileDescriptor recognizerStopSound;
// 
//     /**
//      * Speaktoit recognition cancel sound resource descriptor
//      */
//     private AssetFileDescriptor recognizerCancelSound;
// 
//     private boolean voiceActivityDetectionEnabled = true;
// 
//     private boolean normalizeInputSound = false;
// 
//     public AIConfiguration(final String clientAccessToken, final SupportedLanguages language, final RecognitionEngine recognitionEngine) {
//         super(clientAccessToken, language);
// 
//         this.recognitionEngine = recognitionEngine;
// 
//         if (recognitionEngine == RecognitionEngine.Speaktoit
//                 && language == SupportedLanguages.Korean) {
//             throw new UnsupportedOperationException("Only System recognition supported for Korean language");
//         }
//     }
// 
//     public RecognitionEngine getRecognitionEngine() {
//         return recognitionEngine;
//     }
// 
//     public boolean isVoiceActivityDetectionEnabled() {
//         return voiceActivityDetectionEnabled;
//     }
// 
//     /**
//      * With setting this field to false you can disable voice activity detection for Speaktoit recognition.
//      * This option does not affect System recognition.
//      * @param voiceActivityDetectionEnabled
//      */
//     public void setVoiceActivityDetectionEnabled(final boolean voiceActivityDetectionEnabled) {
//         this.voiceActivityDetectionEnabled = voiceActivityDetectionEnabled;
//     }
// 
//     /**
//      * With setting this field to true you can enable sound amplification if it's too quiet. This option improves recognition quality on some devices.
//      * This option does not affect System recognition.
//      * @param normalizeInputSound
//      */
//     public void setNormalizeInputSound(final boolean normalizeInputSound) {
//         this.normalizeInputSound = normalizeInputSound;
//     }
// 
//     public boolean isNormalizeInputSound() {
//         return normalizeInputSound;
//     }
// 
//     public AssetFileDescriptor getRecognizerStartSound() {
//         return recognizerStartSound;
//     }
// 
//     public void setRecognizerStartSound(final AssetFileDescriptor recognizerStartSound) {
//         this.recognizerStartSound = recognizerStartSound;
//     }
// 
//     public AssetFileDescriptor getRecognizerStopSound() {
//         return recognizerStopSound;
//     }
// 
//     public void setRecognizerStopSound(final AssetFileDescriptor recognizerStopSound) {
//         this.recognizerStopSound = recognizerStopSound;
//     }
// 
//     public AssetFileDescriptor getRecognizerCancelSound() {
//         return recognizerCancelSound;
//     }
// 
//     public void setRecognizerCancelSound(final AssetFileDescriptor recognizerCancelSound) {
//         this.recognizerCancelSound = recognizerCancelSound;
//     }
// }
// 
// Path: ailib/src/main/java/ai/api/android/AIDataService.java
// public class AIDataService extends ai.api.AIDataService {
// 
// 
//     public static final String TAG = AIDataService.class.getName();
// 
//     @NonNull
//     private final Context context;
// 
//     @NonNull
//     private final AIConfiguration config;
// 
//     @NonNull
//     private final Gson gson = GsonFactory.getGson();
// 
//     public AIDataService(@NonNull final Context context, @NonNull final AIConfiguration config) {
//         super(config, new AIAndroidServiceContext(context));
//         this.context = context;
//         this.config = config;
//     }
// 
//     private static class AIAndroidServiceContext implements AIServiceContext {
// 
//         private final String sessionId;
// 
//         public AIAndroidServiceContext(final Context context) {
//             sessionId = SessionIdStorage.getSessionId(context);
//         }
// 
//         public String getSessionId() {
//             return sessionId;
//         }
// 
//         public TimeZone getTimeZone() { return TimeZone.getDefault(); }
//     }
// }


// Path: ailib/src/test/java/ai/api/test/compatibility/V20150415ProtocolTest.java
import ai.api.model.AIContext;
import ai.api.model.AIRequest;
import ai.api.model.AIResponse;
import static org.junit.Assert.assertEquals;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import java.util.Collections;
import java.util.List;
import ai.api.android.AIConfiguration;
import ai.api.android.AIDataService;
import ai.api.AIServiceException;
import ai.api.BuildConfig;

/**
 * Copyright 2017 Google Inc. All Rights Reserved.
 *
 * 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 ai.api.test.compatibility;





/**
 * Test for backward compatibility to the first protocol version ("20150415")
 */
@Config(constants = BuildConfig.class, manifest = Config.NONE, sdk = BuildConfig.TESTS_SDK)
@RunWith(RobolectricTestRunner.class)
@Ignore
public class V20150415ProtocolTest {
    private static final String PROTOCOL_VERSION = "20150415";

    @Test
    public void legacyContextsWithoutParametersTest() throws AIServiceException {
        final AIConfiguration config = new AIConfiguration(
                "3485a96fb27744db83e78b8c4bc9e7b7",
                AIConfiguration.SupportedLanguages.English,
                AIConfiguration.RecognitionEngine.System);