@Test
public final void testRunShouldSendMessageToIndexDeletion() {

    // GIVEN
    Whitebox.setInternalState(underTest, "timeLimitInSeconds", 10);
    Whitebox.setInternalState(underTest, "simpleDateFormat", new SimpleDateFormat("yyyyMMddHHmmss"));
    File file1 = Mockito.mock(File.class);
    given(file1.getAbsolutePath()).willReturn("20130701151510.0000resp.txt");
    given(file1.getName()).willReturn("20130701151510.0000resp.txt");
    File[] messageFiles = new File[1];
    messageFiles[0] = file1;
    given(logFilePath.getLogFilePath()).willReturn(path);
    given(path.toFile()).willReturn(logFolder);
    given(logFolder.listFiles(fileFilter)).willReturn(messageFiles);
    given(file1.delete()).willReturn(true);
    Calendar cal = Calendar.getInstance();
    cal.set(2013, 6, 1, 15, 15, 21);
    Date date = cal.getTime();
    given(currentDateProvider.getCurrentDate()).willReturn(date);
    // WHEN
    underTest.run();
    // THEN
    verify(indexDeletionProcessor).process("20130701151510.0000resp.txt");
}