@BeforeClass public void beforeClass() throws IOException { System.out.println("Start LocalPaginatedClusterTest"); buildDirectory = System.getProperty("buildDirectory"); if (buildDirectory == null || buildDirectory.isEmpty()) buildDirectory = "."; buildDirectory += "/localPaginatedClusterTest"; OLocalPaginatedStorage storage = mock(OLocalPaginatedStorage.class); OStorageConfiguration storageConfiguration = mock(OStorageConfiguration.class); storageConfiguration.clusters = new ArrayList<OStorageClusterConfiguration>(); storageConfiguration.fileTemplate = new OStorageSegmentConfiguration(); when(storageConfiguration.getDirectory()).thenReturn(buildDirectory); diskCache = new OReadWriteDiskCache(400L * 1024 * 1024 * 1024, 2648L * 1024 * 1024, OGlobalConfiguration.DISK_CACHE_PAGE_SIZE.getValueAsInteger() * 1024, 1000000, 100, storage, null, false, false); OStorageVariableParser variableParser = new OStorageVariableParser(buildDirectory); when(storage.getDiskCache()).thenReturn(diskCache); when(storage.getVariableParser()).thenReturn(variableParser); when(storage.getConfiguration()).thenReturn(storageConfiguration); when(storage.getMode()).thenReturn("rw"); when(storage.getStoragePath()).thenReturn(buildDirectory); when(storageConfiguration.getDirectory()).thenReturn(buildDirectory); paginatedCluster.configure(storage, 5, "paginatedClusterTest", buildDirectory, -1); paginatedCluster.create(-1); }