@Test
public void testNextChunkEvenIfThereAreNone() throws IOException {

	// Test Constants
	final int TOTAL_FILE_SIZE = 5*1024;
	final int CHUNK_SIZE = 512*1024;
	
	// Setup				
	File inputFile = TestFileUtil.createRandomFileInDirectory(tempDir, TOTAL_FILE_SIZE);		
	Chunker chunker = new TttdChunker(CHUNK_SIZE);
	
	// Create chunks
	Enumeration<Chunk> chunkEnumeration = chunker.createChunks(inputFile);
	
	while (chunkEnumeration.hasMoreElements()) {
		chunkEnumeration.nextElement();
	}
	
	// This should lead to an IOException
	assertNull("No chunk expected, but data received.", chunkEnumeration.nextElement());
	assertFalse("hasElements() should return 'false' if no chunk available.", chunkEnumeration.hasMoreElements());
}