ClassPathResource implements Resource { @Override public String getName() { return name; } ClassPathResource(String resourceName);  ClassPathResource(String resourceName, ClassLoader classLoader); @Override InputStream getInputStream(); @Override String getName(); @Override long getLength(); @Override String toString();  }
@Test public void testGetName() { assertEquals("someName", new ClassPathResource("/my/package/someName").getName()); assertEquals("someName.dfi.sdfj", new ClassPathResource("/my/package/someName.dfi.sdfj").getName()); assertEquals("someName", new ClassPathResource("someName").getName()); assertEquals("someName.dfi.sdfj", new ClassPathResource("someName.dfi.sdfj").getName()); }