// Path: app/src/androidTest/java/com/ToxicBakery/app/screenshot_redaction/ActivityTest.java
// public class ActivityTest extends Activity {
// 
// }
// 
// Path: app/src/main/java/com/ToxicBakery/app/screenshot_redaction/bus/CopyBus.java
// public class CopyBus extends ADefaultBus<ICopyConfiguration> {
// 
//     private static volatile CopyBus instance;
// 
//     public static CopyBus getInstance() {
//         if (instance == null) {
//             synchronized (CopyBus.class) {
//                 if (instance == null) {
//                     instance = new CopyBus();
//                 }
//             }
//         }
// 
//         return instance;
//     }
// 
// }
// 
// Path: app/src/main/java/com/ToxicBakery/app/screenshot_redaction/copy/CopyToSdCard.java
// public class CopyToSdCard {
// 
//     public void copy(@NonNull ICopyConfiguration copy) {
//         Observable.just(copy)
//                 .observeOn(Schedulers.io())
//                 .subscribeOn(Schedulers.io())
//                 .subscribe(new CopyAction());
//     }
// 
//     public interface ICopyConfiguration {
// 
//         InputStream getCopyStream() throws IOException;
// 
//         File getTarget() throws IOException;
// 
//         long getSize() throws IOException;
// 
//     }
// 
// }
// 
// Path: app/src/main/java/com/ToxicBakery/app/screenshot_redaction/copy/WordListRawResourceCopyConfiguration.java
// public class WordListRawResourceCopyConfiguration implements CopyToSdCard.ICopyConfiguration {
// 
//     private static final String FOLDER = "wordlists";
// 
//     private final Context context;
//     private final int rawRes;
//     private final File baseDir;
// 
//     public WordListRawResourceCopyConfiguration(@NonNull Context context,
//                                                 @RawRes int rawRes) {
// 
//         this.context = context.getApplicationContext();
//         this.rawRes = rawRes;
// 
//         baseDir = new File(context.getExternalFilesDir(null), FOLDER);
// 
//         try {
//             FileUtils.forceMkdir(baseDir);
//         } catch (IOException e) {
//             throw new IllegalStateException("Failed to create required directory " + baseDir, e);
//         }
//     }
// 
//     @Override
//     public InputStream getCopyStream() throws IOException {
//         return context.getResources()
//                 .openRawResource(rawRes);
//     }
// 
//     @Override
//     public File getTarget() throws IOException {
//         String resourceEntryName = context.getResources()
//                 .getResourceEntryName(rawRes);
// 
//         return new File(baseDir, resourceEntryName);
//     }
// 
//     @Override
//     public long getSize() throws IOException {
//         InputStream inputStream = context.getResources()
//                 .openRawResource(rawRes);
// 
//         long fileSize = inputStream.available();
//         inputStream.close();
// 
//         return fileSize;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (o != null
//                 && o instanceof WordListRawResourceCopyConfiguration) {
// 
//             WordListRawResourceCopyConfiguration other = (WordListRawResourceCopyConfiguration) o;
//             return rawRes == other.rawRes
//                     && baseDir.equals(other.baseDir);
//         }
// 
//         return false;
//     }
// 
// }


import android.content.Context;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.ToxicBakery.app.screenshot_redaction.R;
import com.ToxicBakery.app.screenshot_redaction.ActivityTest;
import com.ToxicBakery.app.screenshot_redaction.bus.CopyBus;
import com.ToxicBakery.app.screenshot_redaction.copy.CopyToSdCard;
import com.ToxicBakery.app.screenshot_redaction.copy.WordListRawResourceCopyConfiguration;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mapdb.DB;
import org.mapdb.DBMaker;
import java.util.Set;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import rx.Subscription;
import rx.functions.Action1;
import rx.schedulers.Schedulers;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
package com.ToxicBakery.app.screenshot_redaction.dictionary.impl;







@RunWith(AndroidJUnit4.class)
public class DictionaryEnglishNamesTest {

    private final Semaphore semaphore = new Semaphore(0);
    @Rule
    public ActivityTestRule<ActivityTest> activityTestRule = new ActivityTestRule<>(ActivityTest.class, false, true);
    private Subscription subscription;

    private Context getContext() {
        return activityTestRule.getActivity();
    }

    @Before
    public void setUp() throws Exception {
// Path: app/src/androidTest/java/com/ToxicBakery/app/screenshot_redaction/ActivityTest.java
// public class ActivityTest extends Activity {
// 
// }
// 
// Path: app/src/main/java/com/ToxicBakery/app/screenshot_redaction/bus/CopyBus.java
// public class CopyBus extends ADefaultBus<ICopyConfiguration> {
// 
//     private static volatile CopyBus instance;
// 
//     public static CopyBus getInstance() {
//         if (instance == null) {
//             synchronized (CopyBus.class) {
//                 if (instance == null) {
//                     instance = new CopyBus();
//                 }
//             }
//         }
// 
//         return instance;
//     }
// 
// }
// 
// Path: app/src/main/java/com/ToxicBakery/app/screenshot_redaction/copy/CopyToSdCard.java
// public class CopyToSdCard {
// 
//     public void copy(@NonNull ICopyConfiguration copy) {
//         Observable.just(copy)
//                 .observeOn(Schedulers.io())
//                 .subscribeOn(Schedulers.io())
//                 .subscribe(new CopyAction());
//     }
// 
//     public interface ICopyConfiguration {
// 
//         InputStream getCopyStream() throws IOException;
// 
//         File getTarget() throws IOException;
// 
//         long getSize() throws IOException;
// 
//     }
// 
// }
// 
// Path: app/src/main/java/com/ToxicBakery/app/screenshot_redaction/copy/WordListRawResourceCopyConfiguration.java
// public class WordListRawResourceCopyConfiguration implements CopyToSdCard.ICopyConfiguration {
// 
//     private static final String FOLDER = "wordlists";
// 
//     private final Context context;
//     private final int rawRes;
//     private final File baseDir;
// 
//     public WordListRawResourceCopyConfiguration(@NonNull Context context,
//                                                 @RawRes int rawRes) {
// 
//         this.context = context.getApplicationContext();
//         this.rawRes = rawRes;
// 
//         baseDir = new File(context.getExternalFilesDir(null), FOLDER);
// 
//         try {
//             FileUtils.forceMkdir(baseDir);
//         } catch (IOException e) {
//             throw new IllegalStateException("Failed to create required directory " + baseDir, e);
//         }
//     }
// 
//     @Override
//     public InputStream getCopyStream() throws IOException {
//         return context.getResources()
//                 .openRawResource(rawRes);
//     }
// 
//     @Override
//     public File getTarget() throws IOException {
//         String resourceEntryName = context.getResources()
//                 .getResourceEntryName(rawRes);
// 
//         return new File(baseDir, resourceEntryName);
//     }
// 
//     @Override
//     public long getSize() throws IOException {
//         InputStream inputStream = context.getResources()
//                 .openRawResource(rawRes);
// 
//         long fileSize = inputStream.available();
//         inputStream.close();
// 
//         return fileSize;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (o != null
//                 && o instanceof WordListRawResourceCopyConfiguration) {
// 
//             WordListRawResourceCopyConfiguration other = (WordListRawResourceCopyConfiguration) o;
//             return rawRes == other.rawRes
//                     && baseDir.equals(other.baseDir);
//         }
// 
//         return false;
//     }
// 
// }


// Path: app/src/androidTest/java/com/ToxicBakery/app/screenshot_redaction/dictionary/impl/DictionaryEnglishNamesTest.java
import android.content.Context;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.ToxicBakery.app.screenshot_redaction.R;
import com.ToxicBakery.app.screenshot_redaction.ActivityTest;
import com.ToxicBakery.app.screenshot_redaction.bus.CopyBus;
import com.ToxicBakery.app.screenshot_redaction.copy.CopyToSdCard;
import com.ToxicBakery.app.screenshot_redaction.copy.WordListRawResourceCopyConfiguration;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mapdb.DB;
import org.mapdb.DBMaker;
import java.util.Set;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import rx.Subscription;
import rx.functions.Action1;
import rx.schedulers.Schedulers;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

package com.ToxicBakery.app.screenshot_redaction.dictionary.impl;







@RunWith(AndroidJUnit4.class)
public class DictionaryEnglishNamesTest {

    private final Semaphore semaphore = new Semaphore(0);
    @Rule
    public ActivityTestRule<ActivityTest> activityTestRule = new ActivityTestRule<>(ActivityTest.class, false, true);
    private Subscription subscription;

    private Context getContext() {
        return activityTestRule.getActivity();
    }

    @Before
    public void setUp() throws Exception {
        subscription = CopyBus.getInstance()