@@ -0,0 +1,2224 @@
+package be.raildelays.batch.processor;%0A%0Aimport be.raildelays.domain.entities.LineStop;%0Aimport be.raildelays.domain.entities.Station;%0Aimport be.raildelays.domain.entities.TrainLine;%0Aimport be.raildelays.repository.LineStopDao;%0Aimport be.raildelays.repository.StationDao;%0Aimport be.raildelays.repository.TrainLineDao;%0Aimport org.easymock.*;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport java.time.LocalDate;%0A%0Aimport static org.easymock.EasyMock.*;%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * @author Almex%0A */%0Apublic class AggregateLineStopProcessorTest extends EasyMockSupport %7B%0A%0A    @TestSubject%0A    public AggregateLineStopProcessor processor = new AggregateLineStopProcessor();%0A%0A    @Mock(type = MockType.NICE)%0A    private LineStopDao lineStopDao;%0A    @Mock(type = MockType.NICE)%0A    private TrainLineDao trainLineDao;%0A    @Mock(type = MockType.NICE)%0A    private StationDao stationDao;%0A%0A    @Rule%0A    public EasyMockRule easyMockRule = new EasyMockRule(this);%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        processor.setLineStopDao(lineStopDao);%0A        processor.setStationDao(stationDao);%0A        processor.setTrainLineDao(trainLineDao);%0A        processor.afterPropertiesSet();%0A    %7D%0A%0A    @Test%0A    public void testProcess() throws Exception %7B%0A        Station station = new Station(%22Li%C3%A8ge-Guillemins%22);%0A        TrainLine trainLine = new TrainLine.Builder(1L).build(false);%0A        LineStop expected = new LineStop.Builder()%0A                .trainLine(trainLine)%0A                .station(station)%0A                .date(LocalDate.now())%0A                .addNext(new LineStop.Builder()%0A                        .trainLine(trainLine)%0A                        .station(new Station(%22Bruxelles-central%22))%0A                        .date(LocalDate.now())%0A                )%0A                .build(false);%0A%0A        expect(lineStopDao.findByRouteIdAndDateAndStationName(anyLong(), anyObject(), anyString())).andReturn(null);%0A        expect(stationDao.findByEnglishName(anyString())).andReturn(station);%0A        expect(trainLineDao.findByRouteId(anyLong())).andReturn(trainLine);%0A%0A        replayAll();%0A%0A        assertNotNull(processor.process(expected));%0A    %7D%0A%7D%0A

Improve testing