// Path: shared/src/main/java/com/optimizely/ab/android/shared/DatafileConfig.java
// public class DatafileConfig {
//     public static String defaultHost = "https://cdn.optimizely.com";
//     public static String projectUrlSuffix = "/json/%s.json";
//     public static String environmentUrlSuffix = "/datafiles/%s.json";
//     public static String delimiter = "::::";
// 
//     private final String projectId;
//     private final String sdkKey;
//     private final String host;
//     private final String datafileUrlString;
// 
//     /**
//      * Constructor used to construct a DatafileConfig to get cache key, url,
//      * for the appropriate environment.  One or the other can be null.  But, not both.
//      * @param projectId project id string.
//      * @param sdkKey the environment url.
//      * @param host used to override the DatafileConfig.defaultHost used for datafile synchronization.
//      */
//     public DatafileConfig(String projectId, String sdkKey, String host) {
//         assert(projectId != null || sdkKey != null);
//         this.projectId = projectId;
//         this.sdkKey = sdkKey;
//         this.host = host;
// 
//         if (sdkKey != null) {
//             this.datafileUrlString = String.format((this.host + environmentUrlSuffix), sdkKey);
//         }
//         else {
//             this.datafileUrlString = String.format((this.host + projectUrlSuffix), projectId);
//         }
//     }
// 
//     /**
//      * Constructor used to construct a DatafileConfig to get cache key, url,
//      * for the appropriate environment.  One or the other can be null.  But, not both.
//      * @param projectId project id string.
//      * @param sdkKey the environment url.
//      */
//     public DatafileConfig(String projectId, String sdkKey) {
//         this(projectId, sdkKey, defaultHost);
//     }
// 
//     /**
//      * This returns the current datafile key string.
//      * @return datafile key string.
//      */
//     public String getKey() {
//         return sdkKey != null ? sdkKey : projectId;
//     }
// 
//     /**
//      * Get the url associated with this project.  If there is an environment,
//      * that url is returned.
//      * @return url of current project configuration.
//      */
//     public String getUrl() {
//         return datafileUrlString;
//     }
// 
//     public String toJSONString() {
//         JSONObject jsonObject = new JSONObject();
//         try {
//             jsonObject.put("projectId", projectId);
//             jsonObject.put("sdkKey", sdkKey);
//             return jsonObject.toString();
//         } catch (JSONException e) {
//             e.printStackTrace();
//         }
// 
//         return null;
//     }
// 
//     public static DatafileConfig fromJSONString(String jsonString) {
//         try {
//             JSONObject jsonObject = new JSONObject(jsonString);
//             String projectId = null;
//             if (jsonObject.has("projectId")) {
//                 projectId = jsonObject.getString("projectId");
//             }
//             String environmentKey = null;
//             if (jsonObject.has("sdkKey")) {
//                 environmentKey = jsonObject.getString("sdkKey");
//             }
//             return new DatafileConfig(projectId, environmentKey);
//         } catch (JSONException e) {
//             e.printStackTrace();
//         }
// 
//         return null;
//     }
//     /**
//      * To string either returns the proejct id as string or a concatenated string of project id
//      * delimiter and environment key.
//      * @return the string identification for the DatafileConfig
//      */
//     @Override
//     public String toString() {
//         return projectId != null ? projectId : "null" + delimiter + (sdkKey != null? sdkKey : "null");
//     }
// 
//     public boolean equals(Object o) {
//         if (o == this) {
//             return true;
//         }
//         if (!(o instanceof DatafileConfig)) {
//             return false;
//         }
//         DatafileConfig p = (DatafileConfig) o;
//         return this.projectId != null ? (p.projectId != null ? this.projectId.equals(p.projectId) : this.projectId == p.projectId) : p.projectId == null
//                 &&
//                 this.sdkKey != null ? (p.sdkKey != null ? this.sdkKey.equals(p.sdkKey) : this.sdkKey == p.sdkKey) : p.sdkKey == null;
// 
//     }
// 
//     public int hashCode() {
//         int result = 17;
//         result = 31 * result + (projectId == null ? 0 : projectId.hashCode()) + (sdkKey == null ? 0 : sdkKey.hashCode());
//         return result;
//     }
// 
// }


import android.content.Context;
import com.optimizely.ab.android.shared.DatafileConfig;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
package com.optimizely.ab.android.datafile_handler;





/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
public class DefaultDatafileHandlerUnitTest {

    DatafileHandler handler = mock(DefaultDatafileHandler.class);

// Path: shared/src/main/java/com/optimizely/ab/android/shared/DatafileConfig.java
// public class DatafileConfig {
//     public static String defaultHost = "https://cdn.optimizely.com";
//     public static String projectUrlSuffix = "/json/%s.json";
//     public static String environmentUrlSuffix = "/datafiles/%s.json";
//     public static String delimiter = "::::";
// 
//     private final String projectId;
//     private final String sdkKey;
//     private final String host;
//     private final String datafileUrlString;
// 
//     /**
//      * Constructor used to construct a DatafileConfig to get cache key, url,
//      * for the appropriate environment.  One or the other can be null.  But, not both.
//      * @param projectId project id string.
//      * @param sdkKey the environment url.
//      * @param host used to override the DatafileConfig.defaultHost used for datafile synchronization.
//      */
//     public DatafileConfig(String projectId, String sdkKey, String host) {
//         assert(projectId != null || sdkKey != null);
//         this.projectId = projectId;
//         this.sdkKey = sdkKey;
//         this.host = host;
// 
//         if (sdkKey != null) {
//             this.datafileUrlString = String.format((this.host + environmentUrlSuffix), sdkKey);
//         }
//         else {
//             this.datafileUrlString = String.format((this.host + projectUrlSuffix), projectId);
//         }
//     }
// 
//     /**
//      * Constructor used to construct a DatafileConfig to get cache key, url,
//      * for the appropriate environment.  One or the other can be null.  But, not both.
//      * @param projectId project id string.
//      * @param sdkKey the environment url.
//      */
//     public DatafileConfig(String projectId, String sdkKey) {
//         this(projectId, sdkKey, defaultHost);
//     }
// 
//     /**
//      * This returns the current datafile key string.
//      * @return datafile key string.
//      */
//     public String getKey() {
//         return sdkKey != null ? sdkKey : projectId;
//     }
// 
//     /**
//      * Get the url associated with this project.  If there is an environment,
//      * that url is returned.
//      * @return url of current project configuration.
//      */
//     public String getUrl() {
//         return datafileUrlString;
//     }
// 
//     public String toJSONString() {
//         JSONObject jsonObject = new JSONObject();
//         try {
//             jsonObject.put("projectId", projectId);
//             jsonObject.put("sdkKey", sdkKey);
//             return jsonObject.toString();
//         } catch (JSONException e) {
//             e.printStackTrace();
//         }
// 
//         return null;
//     }
// 
//     public static DatafileConfig fromJSONString(String jsonString) {
//         try {
//             JSONObject jsonObject = new JSONObject(jsonString);
//             String projectId = null;
//             if (jsonObject.has("projectId")) {
//                 projectId = jsonObject.getString("projectId");
//             }
//             String environmentKey = null;
//             if (jsonObject.has("sdkKey")) {
//                 environmentKey = jsonObject.getString("sdkKey");
//             }
//             return new DatafileConfig(projectId, environmentKey);
//         } catch (JSONException e) {
//             e.printStackTrace();
//         }
// 
//         return null;
//     }
//     /**
//      * To string either returns the proejct id as string or a concatenated string of project id
//      * delimiter and environment key.
//      * @return the string identification for the DatafileConfig
//      */
//     @Override
//     public String toString() {
//         return projectId != null ? projectId : "null" + delimiter + (sdkKey != null? sdkKey : "null");
//     }
// 
//     public boolean equals(Object o) {
//         if (o == this) {
//             return true;
//         }
//         if (!(o instanceof DatafileConfig)) {
//             return false;
//         }
//         DatafileConfig p = (DatafileConfig) o;
//         return this.projectId != null ? (p.projectId != null ? this.projectId.equals(p.projectId) : this.projectId == p.projectId) : p.projectId == null
//                 &&
//                 this.sdkKey != null ? (p.sdkKey != null ? this.sdkKey.equals(p.sdkKey) : this.sdkKey == p.sdkKey) : p.sdkKey == null;
// 
//     }
// 
//     public int hashCode() {
//         int result = 17;
//         result = 31 * result + (projectId == null ? 0 : projectId.hashCode()) + (sdkKey == null ? 0 : sdkKey.hashCode());
//         return result;
//     }
// 
// }


// Path: datafile-handler/src/test/java/com/optimizely/ab/android/datafile_handler/DefaultDatafileHandlerUnitTest.java
import android.content.Context;
import com.optimizely.ab.android.shared.DatafileConfig;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

package com.optimizely.ab.android.datafile_handler;





/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
public class DefaultDatafileHandlerUnitTest {

    DatafileHandler handler = mock(DefaultDatafileHandler.class);

    @Test