@@ -0,0 +1,1982 @@
+package garbagetown.domain.service.tourinfo;%0A%0Aimport garbagetown.domain.model.Arrival;%0Aimport garbagetown.domain.model.Departure;%0Aimport garbagetown.domain.model.Tourinfo;%0Aimport garbagetown.domain.repository.tourinfo.TourinfoCriteria;%0Aimport garbagetown.domain.repository.tourinfo.TourinfoRepository;%0Aimport org.hamcrest.CoreMatchers;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.springframework.data.domain.Page;%0Aimport org.springframework.data.domain.PageImpl;%0Aimport org.springframework.data.domain.PageRequest;%0Aimport org.springframework.data.domain.Pageable;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0A/**%0A * Created by garbagetown on 12/6/15.%0A */%0Apublic class TourinfoServiceImplTest %7B%0A%0A    TourinfoServiceImpl tourinfoService;%0A    TourinfoRepository tourinfoRepository;%0A%0A    @Before%0A    public void setUp() %7B%0A        tourinfoService = new TourinfoServiceImpl();%0A        tourinfoRepository = mock(TourinfoRepository.class);%0A        tourinfoService.tourinfoRepository = tourinfoRepository;%0A    %7D%0A%0A    @Test%0A    public void testSearch() %7B%0A%0A        TourinfoCriteria criteria = new TourinfoCriteria();%0A        Pageable pageable = new PageRequest(0, 10);%0A%0A        List%3CTourinfo%3E list = new ArrayList%3C%3E();%0A%0A        Tourinfo info = new Tourinfo();%0A        info.setTourCode(%2212345678%22);%0A%0A        Arrival arrival = new Arrival();%0A        arrival.setArrCode(%22aaaa%22);%0A        info.setArrival(arrival);%0A%0A        Departure departure = new Departure();%0A        departure.setDepCode(%22dddd%22);%0A        info.setDeparture(departure);%0A%0A        list.add(info);%0A%0A        Page%3CTourinfo%3E page = new PageImpl%3C%3E(list);%0A%0A        when(tourinfoRepository.findPageBySearchCriteria(criteria, pageable)).thenReturn(page);%0A%0A        Page%3CTourinfo%3E result = tourinfoService.search(criteria, pageable);%0A%0A        assertThat(result, CoreMatchers.is(page));%0A    %7D%0A%7D%0A

add a test for TourinfoService