@@ -0,0 +1,2673 @@
+package be.raildelays.batch.tasklet;%0A%0Aimport be.raildelays.batch.AbstractFileTest;%0Aimport org.junit.After;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.springframework.batch.core.StepContribution;%0Aimport org.springframework.batch.core.StepExecution;%0Aimport org.springframework.batch.core.scope.context.ChunkContext;%0Aimport org.springframework.batch.core.scope.context.StepContext;%0Aimport org.springframework.batch.repeat.RepeatStatus;%0Aimport org.springframework.batch.test.MetaDataInstanceFactory;%0Aimport org.springframework.core.io.FileSystemResource;%0Aimport org.springframework.core.io.Resource;%0A%0Aimport java.io.File;%0A%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * @author Almex%0A */%0Apublic class MoveFileTaskletTest extends AbstractFileTest %7B%0A%0A    private MoveFileTasklet tasklet;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        tasklet = new MoveFileTasklet();%0A        tasklet.setSource(new FileSystemResource(CURRENT_PATH + EXCEL_FILE_NAME));%0A        tasklet.setDestination(%0A                new FileSystemResource(CURRENT_PATH + File.separator + %22copy%22 + File.separator + EXCEL_FILE_NAME)%0A        );%0A        tasklet.afterPropertiesSet();%0A        cleanUp();%0A        copyFile();%0A    %7D%0A%0A    @Test%0A    public void testMove() throws Exception %7B%0A        Assert.assertEquals(1, getExcelFiles().length);%0A%0A        StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution();%0A        StepContribution stepContribution = new StepContribution(stepExecution);%0A        ChunkContext chunkContext = new ChunkContext(new StepContext(stepExecution));%0A%0A        RepeatStatus repeatStatus = tasklet.execute(stepContribution, chunkContext);%0A%0A        Assert.assertEquals(RepeatStatus.FINISHED, repeatStatus);%0A        Assert.assertEquals(0, getExcelFiles().length);%0A        Assert.assertEquals(1, stepContribution.getWriteCount());%0A    %7D%0A%0A    @Test%0A    public void testMoveToNullDestination() throws Exception %7B%0A        Assert.assertEquals(1, getExcelFiles().length);%0A%0A        StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution();%0A        StepContribution stepContribution = new StepContribution(stepExecution);%0A        ChunkContext chunkContext = new ChunkContext(new StepContext(stepExecution));%0A%0A        tasklet.setDestination(null);%0A%0A        RepeatStatus repeatStatus = tasklet.execute(stepContribution, chunkContext);%0A%0A        Assert.assertEquals(RepeatStatus.FINISHED, repeatStatus);%0A        Assert.assertEquals(0, getExcelFiles().length);%0A        Assert.assertEquals(0, stepContribution.getWriteCount());%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A        cleanUp();%0A    %7D%0A%7D%0A

Create MoveFileTaskletTest.java