MappedByteBuffer mapped = readOnlyFileChannel.map(MapMode.READ_ONLY,
sizes[i], CONTENT_LEN);
assertEquals("Incorrectly mapped file channel for " + sizes[i]
+ " position (capacity)", CONTENT_LEN, mapped.capacity());
assertEquals("Incorrectly mapped file channel for " + sizes[i]
+ " position (limit)", CONTENT_LEN, mapped.limit());
assertEquals("Incorrectly mapped file channel for " + sizes[i]
+ " position (position)", 0, mapped.position());
// map not change channel's position
assertEquals(0, readOnlyFileChannel.position());