@@ -0,0 +1,1864 @@
+package com.wassim.androidmvpbase.data;%0A%0Aimport com.wassim.androidmvpbase.data.local.database.DatabaseHelper;%0Aimport com.wassim.androidmvpbase.data.local.preferences.PreferencesHelper;%0Aimport com.wassim.androidmvpbase.data.model.Movie;%0Aimport com.wassim.androidmvpbase.data.remote.ApiService;%0Aimport com.wassim.androidmvpbase.test.common.TestDataFactory;%0Aimport com.wassim.androidmvpbase.ui.views.main.MainMvpView;%0Aimport com.wassim.androidmvpbase.ui.views.main.MainPresenter;%0Aimport com.wassim.androidmvpbase.util.EventPosterHelper;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport java.util.List;%0A%0Aimport rx.Observable;%0Aimport rx.observers.TestSubscriber;%0A%0Aimport static org.mockito.Mockito.doReturn;%0Aimport static org.mockito.Mockito.never;%0Aimport static org.mockito.Mockito.verify;%0A%0A/**%0A * Created by beltaief on 2/4/2016.%0A */%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class DataManagerTest %7B%0A%0A    @Mock%0A    ApiService mApiServiceMock;%0A%0A    @Mock%0A    DatabaseHelper mDatabaseHelperMock;%0A%0A    @Mock%0A    PreferencesHelper mPreferencesHelperMock;%0A%0A    @Mock%0A    EventPosterHelper mEventPosterMock;%0A%0A    private DataManager mDataManager;%0A%0A    @Before%0A    public void setUp() %7B%0A        mDataManager = new DataManager(mApiServiceMock, mPreferencesHelperMock,%0A                mDatabaseHelperMock, mEventPosterMock);%0A    %7D%0A%0A    @Test%0A    public void getAndSaveMoviesTest() %7B%0A        List%3CMovie%3E movies = TestDataFactory.makeMovies();%0A        doReturn(Observable.just(movies))%0A                .when(mApiServiceMock)%0A                .getMovies();%0A%0A        TestSubscriber%3CMovie%3E result = new TestSubscriber%3C%3E();%0A        mDataManager.getAndSaveMovies().subscribe(result);%0A%0A        result.assertNoErrors();%0A        result.assertReceivedOnNext(movies);%0A    %7D%0A%7D%0A

add Unit Test for DataManager method getAndSaveMovies