### Question:
AptUtils { public static boolean isLocalLink( String link ) { return ( link.startsWith( "/" ) || link.startsWith( "./" ) || link.startsWith( "../" ) ); } private  AptUtils(); static String encodeFragment( String text ); static boolean isExternalLink( String link ); static boolean isInternalLink( String link ); static boolean isLocalLink( String link ); static String linkToKey( String text ); static String encodeAnchor( String id );  }### Answer:
@Test public void testIsLocalLink() { String link = "/index.html"; assertTrue( "Should be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "./index.html"; assertTrue( "Should be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "../index.html"; assertTrue( "Should be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); link = ".\\index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "\\index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); link = "..\\index.html"; assertFalse( "Should NOT be a local link: " + link, AptUtils.isLocalLink( link ) ); }