    @Test
    public void testURLToClassMapping() throws IOException {

    	List<Entry<String,String>> tests;
    	
    	ServletMappings mappings = getTestMappings();
    	
    	tests = makeMappingsList(
    			"/fruit/summer/index.html", "myservlets.watermelon",
    			"/fruit/summer/index.abc", "myservlets.watermelon",
    			"/seedlist", "myservlets.list",
    			"/seedlist/pear.abc", "myservlets.kiwi",
    			"/seeds", "myservlets.garden",
    			"/seeds/index.html", "myservlets.garden",
    			"/index.abc", "myservlets.kiwi",
    			
    			"/foo/bar/index.html", "myservlets.servlet1",
    			"/foo/bar/index.bop", "myservlets.servlet1",
    			"/baz", "myservlets.servlet2",
    			"/baz/index.html", "myservlets.servlet2",
    			"/catalog", "myservlets.servlet3",
    			"/catalog/index.html", ServletMappings.DEFAULT_SERVLET,
    			"/catalog/racecar.bop", "myservlets.servlet4",
    			"/index.bop", "myservlets.servlet4"
    			);
    	
    	assertTrue("The wrong number of tests were present",
    			tests.size() == 15);
    	
    	for (Entry<String, String> entry : tests) {
    		String result = mappings.getClassForURL(entry.getKey());
    		String errorString = "Test failed for " + entry.getKey() + " -> " +
    				entry.getValue() + "\nActual result was " + result;
    		assertTrue(errorString, result.equals(entry.getValue()));
    	}
    }