Buggy code:
public class BasicResourceReferenceMapperTest extends AbstractResourceReferenceMapperTest { private static final IProvider < IResourceCachingStrategy > NO_CACHING = new org . apache . wicket . util . ValueProvider < IResourceCachingStrategy > ( NoOpResourceCachingStrategy . INSTANCE ) ; public BasicResourceReferenceMapperTest ( ) { } private final BasicResourceReferenceMapper encoder = new BasicResourceReferenceMapper ( new PageParametersEncoder ( ) , BasicResourceReferenceMapperTest . NO_CACHING ) { @ Override protected IMapperContext getContext ( ) { } } ; public void testDecode1 ( ) { } public void testDecode1A ( ) { } public void testDecode2 ( ) { } public void testDecode2A ( ) { } public void testDecode3 ( ) { } public void testDecode3A ( ) { } public void testDecode3B ( ) { } public void testDecode4 ( ) { } public void testDecode5 ( ) { } public void testDecode6 ( ) { } public void testDecode7 ( ) { } public void testDecode7A ( ) { } public void testDecode8 ( ) { } public void testDecode9 ( ) { } public void testDecode10 ( ) { } public void testEncode1 ( ) { } public void testEncode2 ( ) { } public void testEncode3 ( ) { } public void testEncode4 ( ) { } public void testEncode5 ( ) { } public void testEncode6 ( ) { } public void testEncode7 ( ) { } public void testEncode8 ( ) { } public void testEncode9 ( ) { } public void testVersionStringInResourceFilename ( ) { final IStaticCacheableResource resource = new IStaticCacheableResource ( ) { public Serializable getCacheKey ( ) { return null ; } <START_BUG> public IResourceStream getResourceStream ( ) { <END_BUG> return new StringResourceStream ( "foo-bar" ) ; } public void respond ( Attributes attributes ) { } } ; final PackageResourceReference reference = new PackageResourceReference ( getClass ( ) , "versioned" , Locale . ENGLISH , "style" , null ) { private static final long serialVersionUID = 1L ; @ Override public IResource getResource ( ) { return resource ; } } ; IResourceCachingStrategy strategy = new org . apache . wicket . request . resource . caching . FilenameWithVersionResourceCachingStrategy ( "-version-" , new StaticResourceVersion ( "foobar" ) ) ; INamedParameters params = new PageParameters ( ) ; ResourceUrl url = new ResourceUrl ( "test.js" , params ) ; strategy . decorateUrl ( url , resource ) ; assertEquals ( "test-version-foobar.js" , url . getFileName ( ) ) ; strategy . undecorateUrl ( url ) ; assertEquals ( "test.js" , url . getFileName ( ) ) ; url = new ResourceUrl ( "test" , params ) ; strategy . decorateUrl ( url , resource ) ; assertEquals ( "test-version-foobar" , url . getFileName ( ) ) ; strategy . undecorateUrl ( url ) ; assertEquals ( "test" , url . getFileName ( ) ) ; url = new ResourceUrl ( "test-version-older.txt" , params ) ; strategy . undecorateUrl ( url ) ; assertEquals ( "test.txt" , url . getFileName ( ) ) ; url = new ResourceUrl ( "test-version-.txt" , params ) ; strategy . undecorateUrl ( url ) ; assertEquals ( "test.txt" , url . getFileName ( ) ) ; url = new ResourceUrl ( "test-version--------" , params ) ; strategy . undecorateUrl ( url ) ; assertEquals ( "test" , url . getFileName ( ) ) ; url = new ResourceUrl ( "test-version-1.0.3-alpha.txt" , params ) ; strategy . undecorateUrl ( url ) ; assertEquals ( "test.txt" , url . getFileName ( ) ) ; strategy = new org . apache . wicket . request . resource . caching . FilenameWithVersionResourceCachingStrategy ( "-version-" , new StaticResourceVersion ( "1.0.4-beta" ) ) ; url = new ResourceUrl ( "test.txt" , params ) ; strategy . decorateUrl ( url , resource ) ; assertEquals ( "test-version-1.0.4-beta.txt" , url . getFileName ( ) ) ; } public void testWicket3918 ( ) { } }

Fix:
public IResourceStream getCacheableResourceStream ( ) {