public class DefaultResourceExtractorTest {
@Test
public void testExtract() throws Exception {
assertEquals(new DefaultResourceExtractor().extract("a.jsp"), "a");
assertEquals(new DefaultResourceExtractor().extract("/b.do"), "b");
assertEquals(new DefaultResourceExtractor().extract("/c/d.action"), "c/d");
assertEquals(new DefaultResourceExtractor().extract("c/d.action"), "c/d");
assertEquals(new DefaultResourceExtractor().extract("//c/d.action"), "c/d");
assertEquals(new DefaultResourceExtractor().extract(" //c/d.action "), "c/d");
assertEquals(new DefaultResourceExtractor().extract(" c/d.action "), "c/d");
assertEquals(new DefaultResourceExtractor().extract(" c/d!remove.action "), "c/d");
}