@Test
public void addExtensionURLString() throws MalformedURLException {

	assertEquals(new URL("http://toto:titi@www.arakhne.org/path/to/file.x.z.z.xyz?toto#frag"), FileSystem.addExtension(createHttpUrl(), ".xyz"));  //$NON-NLS-1$ //$NON-NLS-2$
	assertEquals(new URL("jar:file:/home/test/j.jar!/org/arakhne/afc/vmutil/file.x.z.z.xyz"), FileSystem.addExtension(createFileInJarUrl(), ".xyz"));  //$NON-NLS-1$ //$NON-NLS-2$
	assertEquals(new URL("file:/the%20path/to/file%20with%20space.toto.xyz"), FileSystem.addExtension(createFileUrlWithSpacesHardCoded(), ".xyz"));  //$NON-NLS-1$ //$NON-NLS-2$
	assertEquals(new URL("jar:file:/the path/to/file with space.toto!/org/arakhne/afc/vmutil/file.x.z.z.xyz"), FileSystem.addExtension(createFileInJarUrlWithSpaces(), ".xyz"));  //$NON-NLS-1$ //$NON-NLS-2$
	assertEquals(new URL("file:///a.b.c.xyz"), FileSystem.addExtension(new URL("file:///a.b.c/"), ".xyz"));   //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
	assertEquals(new URL("file", "", ""), FileSystem.addExtension(new URL("file://"), ".xyz"));   //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}