### Question:
ResourceBundleAppendingTransformer implements ResourceTransformer { public boolean canTransformResource( String r ) { if ( resourceBundlePattern != null && resourceBundlePattern.matcher( r ).matches() ) { return true; } return false; }  void setBasename( String basename ); boolean canTransformResource( String r ); void processResource( String resource, InputStream is, List<Relocator> relocators ); boolean hasTransformedResource(); void modifyOutputStream( JarOutputStream jos );  }### Answer:
@Test public void testCanTransformResource() { transformer.setBasename( "a/b/c/ButtonLabel" ); assertTrue( transformer.canTransformResource( "a/b/c/ButtonLabel.properties" ) ); assertTrue( transformer.canTransformResource( "a/b/c/ButtonLabel_en.properties" ) ); assertTrue( transformer.canTransformResource( "a/b/c/ButtonLabel_en_US.properties" ) ); assertTrue( transformer.canTransformResource( "a/b/c/ButtonLabel_fr.properties" ) ); assertTrue( transformer.canTransformResource( "a/b/c/ButtonLabel_fr_CA.properties" ) ); assertTrue( transformer.canTransformResource( "a/b/c/ButtonLabel_fr_CA_UNIX.properties" ) ); assertFalse( transformer.canTransformResource( "a/b/c/ButtonLabel.class" ) ); assertFalse( transformer.canTransformResource( "c/ButtonLabel.properties" ) ); assertFalse( transformer.canTransformResource( "ButtonLabel.properties" ) ); }