@@ -0,0 +1,1881 @@
+package com.vishnus1224.teamworkapidemo.repository;%0A%0Aimport com.vishnus1224.teamworkapidemo.datastore.DataStore;%0Aimport com.vishnus1224.teamworkapidemo.mapper.LatestActivityResponseToDtoMapper;%0Aimport com.vishnus1224.teamworkapidemo.model.LatestActivityDto;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0A%0Aimport java.util.List;%0A%0Aimport rx.Observable;%0Aimport rx.observers.TestSubscriber;%0A%0Aimport static org.junit.Assert.*;%0Aimport static org.mockito.Matchers.anyString;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0A/**%0A * Created by vishnu on 07/09/16.%0A */%0Apublic class LatestActivityCloudRepositoryTest %7B%0A%0A    @Mock%0A    private DataStore dataStore;%0A%0A    @Mock%0A    private LatestActivityResponseToDtoMapper latestActivityResponseToDtoMapper;%0A%0A    private LatestActivityCloudRepository latestActivityCloudRepository;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A%0A        MockitoAnnotations.initMocks(this);%0A%0A        latestActivityCloudRepository = new LatestActivityCloudRepository(dataStore, latestActivityResponseToDtoMapper);%0A%0A    %7D%0A%0A    @Test%0A    public void testGetAllItems() throws Exception %7B%0A%0A        when(dataStore.getAllItems()).thenReturn(Observable.empty());%0A%0A        Observable%3CList%3CLatestActivityDto%3E%3E observable = latestActivityCloudRepository.getAllItems();%0A%0A        TestSubscriber testSubscriber = new TestSubscriber();%0A%0A        observable.subscribe(testSubscriber);%0A%0A        testSubscriber.assertNoValues();%0A        testSubscriber.assertNoErrors();%0A        testSubscriber.assertCompleted();%0A%0A        verify(dataStore).getAllItems();%0A%0A    %7D%0A%0A    @Test%0A    public void testSearchItems() throws Exception %7B%0A%0A        Observable%3CList%3CLatestActivityDto%3E%3E observable = latestActivityCloudRepository.searchItems(%22%22);%0A%0A        assertNull(observable);%0A%0A    %7D%0A%7D

test for the latest activity cloud repository