Code example for FileChannel

Methods: close, lock

0
        notes = "", 
        method = "overlaps", 
        args = {long.class, long.class} 
    ) 
    public void test_overlaps_JJ() { 
        assertTrue(mockLock.overlaps(0, 11));
        assertFalse(mockLock.overlaps(0, 10));
        assertTrue(mockLock.overlaps(100, 110));
        assertTrue(mockLock.overlaps(99, 110));
        assertFalse(mockLock.overlaps(-1, 10));
        //Harmony-671 regression test 
        assertTrue(mockLock.overlaps(1, 120));
        assertTrue(mockLock.overlaps(20, 50));
    } 
 
    /** 
     * @tests java.nio.channels.FileLock#isValid() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "",