private static final String FILE_NAME = "largeFile";
private static final long TEST_SIZE = ((long)Integer.MAX_VALUE) + 10;//something not fitting in int
private static final int AUTO_BUFFER = 16;//ridiculously low
public void testAutoChunkingOnLargeFiles() throws CacheLoaderException {
FileCacheKey k = new FileCacheKey(INDEX_NAME, FILE_NAME);
DirectoryLoaderAdaptor adaptor = new DirectoryLoaderAdaptor(new InternalDirectoryContractImpl(), INDEX_NAME, AUTO_BUFFER);
Object loaded = adaptor.load(k);
AssertJUnit.assertTrue(loaded instanceof FileMetadata);
FileMetadata metadata = (FileMetadata)loaded;
AssertJUnit.assertEquals(23, metadata.getLastModified());