throws Exception
{
URL url = buildUrl( "nested.jar",
"!/lib/a.jar!/a/A.class" );
JarUrlConnection connection = new JarUrlConnection( url );
String[] segments = connection.getSegments();
assertEquals( 2,
segments.length );
assertEquals( "/lib/a.jar",
segments[0] );
assertEquals( "/a/A.class",
segments[1] );
URL baseResource = connection.getBaseResource();
assertTrue( baseResource.toExternalForm().startsWith( "file:" ) );
assertTrue( baseResource.toExternalForm().endsWith( "nested.jar" ) );
}