@@ -0,0 +1,2100 @@
+package com.uxxu.konashi.lib.action;%0A%0Aimport android.bluetooth.BluetoothGattCharacteristic;%0Aimport android.bluetooth.BluetoothGattService;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.ArgumentCaptor;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0A%0Aimport java.util.UUID;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.mockito.Matchers.any;%0Aimport static org.mockito.Mockito.times;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0A/**%0A * Created by izumin on 9/21/15.%0A */%0Apublic class I2cSetReadParamActionTest %7B%0A%0A    @Mock private BluetoothGattService mService;%0A    @Mock private BluetoothGattCharacteristic mCharacteristic;%0A%0A    private I2cSetReadParamAction mAction;%0A%0A    private ArgumentCaptor%3Cbyte%5B%5D%3E mValueCaptor;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        MockitoAnnotations.initMocks(this);%0A        mValueCaptor = ArgumentCaptor.forClass(byte%5B%5D.class);%0A        when(mService.getCharacteristic(any(UUID.class))).thenReturn(mCharacteristic);%0A    %7D%0A%0A    @Test%0A    public void hasValidParams_WithOverLength() throws Exception %7B%0A        mAction = new I2cSetReadParamAction(mService, 20, (byte) 0x53);%0A        assertThat(mAction.hasValidParams()).isFalse();%0A    %7D%0A%0A    @Test%0A    public void hasValidParams_WithUnderValidLength() throws Exception %7B%0A        mAction = new I2cSetReadParamAction(mService, -1, (byte) 0x53);%0A        assertThat(mAction.hasValidParams()).isFalse();%0A    %7D%0A%0A    @Test%0A    public void hasValidParams_WithValidParams() throws Exception %7B%0A        mAction = new I2cSetReadParamAction(mService, 5, (byte) 0x53);%0A        assertThat(mAction.hasValidParams()).isTrue();%0A    %7D%0A%0A    @Test%0A    public void setValue_WithValidParams() throws Exception %7B%0A        mAction = new I2cSetReadParamAction(mService, 5, (byte) 0x53);%0A        mAction.setValue();%0A        verify(mCharacteristic, times(1)).setValue(mValueCaptor.capture());%0A        assertThat(mValueCaptor.getValue()%5B0%5D).isEqualTo(5);%0A        assertThat(mValueCaptor.getValue()%5B0%5D).isEqualTo(0xa7);%0A    %7D%0A%7D%0A

Add test for I2cSetReadParamAction