// Path: app/src/androidTest/java/com/jachness/blockcalls/AndroidTest.java
// public abstract class AndroidTest {
//     private Context targetContext;
//     private AllComponentTest component;
//     private AppPreferences appPreferences;
//     private Context context;
// 
//     protected void setUp() throws Exception {
//         targetContext = InstrumentationRegistry.getTargetContext();
//         context = InstrumentationRegistry.getContext();
//         component = DaggerAllComponentTest.builder().blockModule(new BlockModule(targetContext))
//                 .appModule(new AppModule(targetContext))
//                 .dAOModule(new DAOModule(targetContext)).build();
//         appPreferences = new AppPreferences(targetContext);
//     }
// 
//     protected Context getTargetContext() {
//         return targetContext;
//     }
// 
//     protected AllComponentTest getComponent() {
//         return component;
//     }
// 
//     protected AppPreferences getAppPreferences() {
//         return appPreferences;
//     }
// 
//     public Context getContext() {
//         return context;
//     }
// }
// 
// Path: app/src/main/java/com/jachness/blockcalls/exceptions/PhoneNumberException.java
// public class PhoneNumberException extends Exception {
// 
//     public PhoneNumberException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: app/src/main/java/com/jachness/blockcalls/exceptions/TooShortNumberException.java
// public class TooShortNumberException extends Exception {
//     public static final int MINIMUM_LENGTH = 3;
// 
//     public TooShortNumberException(String message) {
//         super(message);
//     }
// }


import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import com.google.i18n.phonenumbers.NumberParseException;
import com.jachness.blockcalls.AndroidTest;
import com.jachness.blockcalls.exceptions.PhoneNumberException;
import com.jachness.blockcalls.exceptions.TooShortNumberException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
package com.jachness.blockcalls.services;





/**
 * Created by jachness on 13/11/2016.
 */
@RunWith(AndroidJUnit4.class)
public class MainWrapperTest extends AndroidTest {
    private static final String TAG = MainWrapperTest.class.getSimpleName();


    @Before
    public void setUp() throws Exception {
        super.setUp();
        getAppPreferences().deleteAll();

    }

    @Test
// Path: app/src/androidTest/java/com/jachness/blockcalls/AndroidTest.java
// public abstract class AndroidTest {
//     private Context targetContext;
//     private AllComponentTest component;
//     private AppPreferences appPreferences;
//     private Context context;
// 
//     protected void setUp() throws Exception {
//         targetContext = InstrumentationRegistry.getTargetContext();
//         context = InstrumentationRegistry.getContext();
//         component = DaggerAllComponentTest.builder().blockModule(new BlockModule(targetContext))
//                 .appModule(new AppModule(targetContext))
//                 .dAOModule(new DAOModule(targetContext)).build();
//         appPreferences = new AppPreferences(targetContext);
//     }
// 
//     protected Context getTargetContext() {
//         return targetContext;
//     }
// 
//     protected AllComponentTest getComponent() {
//         return component;
//     }
// 
//     protected AppPreferences getAppPreferences() {
//         return appPreferences;
//     }
// 
//     public Context getContext() {
//         return context;
//     }
// }
// 
// Path: app/src/main/java/com/jachness/blockcalls/exceptions/PhoneNumberException.java
// public class PhoneNumberException extends Exception {
// 
//     public PhoneNumberException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: app/src/main/java/com/jachness/blockcalls/exceptions/TooShortNumberException.java
// public class TooShortNumberException extends Exception {
//     public static final int MINIMUM_LENGTH = 3;
// 
//     public TooShortNumberException(String message) {
//         super(message);
//     }
// }


// Path: app/src/androidTest/java/com/jachness/blockcalls/services/MainWrapperTest.java
import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import com.google.i18n.phonenumbers.NumberParseException;
import com.jachness.blockcalls.AndroidTest;
import com.jachness.blockcalls.exceptions.PhoneNumberException;
import com.jachness.blockcalls.exceptions.TooShortNumberException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

package com.jachness.blockcalls.services;





/**
 * Created by jachness on 13/11/2016.
 */
@RunWith(AndroidJUnit4.class)
public class MainWrapperTest extends AndroidTest {
    private static final String TAG = MainWrapperTest.class.getSimpleName();


    @Before
    public void setUp() throws Exception {
        super.setUp();
        getAppPreferences().deleteAll();

    }

    @Test
    public void testCheckAndBlock() throws NumberParseException, PhoneNumberException,