@@ -0,0 +1,1853 @@
+package com.setiawanpaiman.sunnyreader.testcase.util;%0A%0Aimport com.setiawanpaiman.sunnyreader.testcase.BaseTest;%0Aimport com.setiawanpaiman.sunnyreader.util.RxUtils;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.junit.MockitoJUnit;%0Aimport org.mockito.junit.MockitoRule;%0Aimport org.robolectric.RobolectricGradleTestRunner;%0A%0Aimport rx.Subscription;%0A%0Aimport static junit.framework.Assert.assertEquals;%0Aimport static org.mockito.Mockito.times;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0A@RunWith(RobolectricGradleTestRunner.class)%0Apublic class RxUtilsTest extends BaseTest %7B%0A%0A    @Rule%0A    public MockitoRule mMockitoRule = MockitoJUnit.rule();%0A%0A    @Mock%0A    Subscription mSubscription1;%0A%0A    @Mock%0A    Subscription mSubscription2;%0A%0A    @Test%0A    public void testIsSubscriptionActive() throws Exception %7B%0A        when(mSubscription1.isUnsubscribed()).thenReturn(true);%0A        when(mSubscription2.isUnsubscribed()).thenReturn(false);%0A%0A        boolean result = RxUtils.isSubscriptionActive(mSubscription1);%0A        assertEquals(false, result);%0A%0A        result = RxUtils.isSubscriptionActive(mSubscription2);%0A        assertEquals(true, result);%0A%0A        result = RxUtils.isSubscriptionActive(null);%0A        assertEquals(false, result);%0A    %7D%0A%0A    @Test%0A    public void testUnsubscribeAll() throws Exception %7B%0A        RxUtils.unsubscribeAll(mSubscription1, mSubscription2);%0A        verify(mSubscription1, times(1)).unsubscribe();%0A        verify(mSubscription2, times(1)).unsubscribe();%0A    %7D%0A%0A    @Test%0A    public void testUnsubscribeAllNullValues() throws Exception %7B%0A        RxUtils.unsubscribeAll(null, mSubscription2);%0A        verify(mSubscription1, times(0)).unsubscribe();%0A        verify(mSubscription2, times(1)).unsubscribe();%0A    %7D%0A%7D%0A

Add RxUtils unit test