@@ -0,0 +1,2564 @@
+package ikube.index.handler.strategy;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0Aimport ikube.ATest;%0Aimport ikube.model.Indexable;%0Aimport ikube.model.IndexableFileSystem;%0Aimport ikube.search.Search;%0Aimport ikube.toolkit.PerformanceTester;%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;%0A%0Aimport mockit.Mock;%0Aimport mockit.MockClass;%0Aimport mockit.Mockit;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0A%0Apublic class DeltaIndexableFilesystemStrategyTest extends ATest %7B%0A%0A%09@MockClass(realClass = Search.class)%0A%09public static class SearchMock %7B%0A%09%09static ArrayList%3CHashMap%3CString, String%3E%3E RESULTS;%0A%0A%09%09@Mock%0A%09%09public ArrayList%3CHashMap%3CString, String%3E%3E execute() %7B%0A%09%09%09return RESULTS;%0A%09%09%7D%0A%09%7D%0A%0A%09private File file;%0A%09private IndexableFileSystem indexableFileSystem;%0A%09private DeltaIndexableFilesystemStrategy deltaStrategy;%0A%0A%09public DeltaIndexableFilesystemStrategyTest() %7B%0A%09%09super(DeltaIndexableFilesystemStrategyTest.class);%0A%09%7D%0A%0A%09@Before%0A%09@SuppressWarnings(%7B %22rawtypes%22, %22unchecked%22 %7D)%0A%09public void before() %7B%0A%09%09deltaStrategy = new DeltaIndexableFilesystemStrategy(null);%0A%0A%09%09file = Mockito.mock(File.class);%0A%09%09indexableFileSystem = Mockito.mock(IndexableFileSystem.class);%0A%09%09Indexable indexable = (Indexable%3C?%3E) indexContext;%0A%09%09Mockito.when(indexableFileSystem.getParent()).thenReturn(indexable);%0A%09%09Mockito.when(indexContext.getMultiSearcher()).thenReturn(multiSearcher);%0A%0A%09%09Mockit.setUpMock(SearchMock.class);%0A%09%7D%0A%0A%09@After%0A%09public void after() %7B%0A%09%09Mockit.tearDownMocks(SearchMock.class);%0A%09%7D%0A%0A%09@Test%0A%09@SuppressWarnings(%22unchecked%22)%0A%09public void preProcess() %7B%0A%09%09SearchMock.RESULTS = new ArrayList%3CHashMap%3CString, String%3E%3E();%0A%09%09boolean mustProcess = deltaStrategy.preProcess(indexableFileSystem, file);%0A%09%09assertFalse(mustProcess);%0A%0A%09%09SearchMock.RESULTS = new ArrayList%3CHashMap%3CString, String%3E%3E(Arrays.asList(new HashMap%3CString, String%3E()));%0A%09%09mustProcess = deltaStrategy.preProcess(indexableFileSystem, file);%0A%09%09assertTrue(mustProcess);%0A%09%7D%0A%0A%09@Test%0A%09public void postProcess() %7B%0A%09%09boolean mustProcess = deltaStrategy.postProcess(indexableFileSystem, file);%0A%09%09assertTrue(mustProcess);%0A%09%7D%0A%0A%09@Test%0A%09public void performance() %7B%0A%09%09int iterations = 1000;%0A%09%09double perSecond = PerformanceTester.execute(new PerformanceTester.APerform() %7B%0A%09%09%09public void execute() throws Throwable %7B%0A%09%09%09%09deltaStrategy.preProcess(indexableFileSystem, file);%0A%09%09%09%7D%0A%09%09%7D, %22Delta strategy %22, iterations, Boolean.TRUE);%0A%09%09assertTrue(perSecond %3E 100);%0A%09%7D%0A%0A%7D

Updating a class test name.