package com.uxxu.konashi.lib.action;

import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattService;

import com.uxxu.konashi.lib.Konashi;
import com.uxxu.konashi.lib.KonashiUUID;

import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

import java.lang.reflect.Method;
import java.util.UUID;

import info.izumin.android.bletia.BletiaException;
import info.izumin.android.bletia.wrapper.BluetoothGattWrapper;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;

/**
 * Created by e10dokup on 2015/10/04
 **/
public class AioAnalogReadActionTest {

    @Mock private BluetoothGattService mService;
    @Mock private BluetoothGattCharacteristic mCharacteristic;
    @Mock private BluetoothGattWrapper mGattWrapper;

    private AioAnalogReadAction mAction;

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);
        when(mService.getCharacteristic(KonashiUUID.ANALOG_READ0_UUID)).thenReturn(mCharacteristic);
    }

    @Test
    public void actionCharacteristic_InvalidPinNumber() throws Exception{
        mAction = new AioAnalogReadAction(mService, 5);
        assertThat(mAction.getCharacteristic()).isNull();
    }

    @Test
    public void actionCharacteristic_ValidPinNumber() throws Exception{
        mAction = new AioAnalogReadAction(mService, Konashi.AIO0);
        assertThat(mAction.getCharacteristic()).isNotNull();
    }
}
@@ -264,43 +264,8 @@
 st;%0A
-import org.mockito.ArgumentCaptor;%0A
 impo
@@ -329,181 +329,8 @@
 s;%0A%0A
-import java.lang.reflect.Method;%0Aimport java.util.UUID;%0A%0Aimport info.izumin.android.bletia.BletiaException;%0Aimport info.izumin.android.bletia.wrapper.BluetoothGattWrapper;%0A%0A
 impo
@@ -387,48 +387,8 @@
 at;%0A
-import static org.mockito.Matchers.any;%0A
 impo
@@ -625,61 +625,8 @@
 tic;
-%0A    @Mock private BluetoothGattWrapper mGattWrapper;
 %0A%0A  

Remove unused imports and members