### Question:
DefaultPluginTransformer implements PluginTransformer { static String generateCacheName(File file) { int dotPos = file.getName().lastIndexOf('.'); if (dotPos > 0 && file.getName().length() - 1 > dotPos) { return file.getName().substring(0, dotPos) + "_" + file.lastModified() + file.getName().substring(dotPos); } else { return file.getName() + "_" + file.lastModified(); } } DefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<String> applicationKeys, String pluginDescriptorPath,
                                    OsgiContainerManager osgiContainerManager);  DefaultPluginTransformer(OsgiPersistentCache cache, SystemExports systemExports, Set<String> applicationKeys, String pluginDescriptorPath,
                                    OsgiContainerManager osgiContainerManager, List<TransformStage> stages); File transform(File pluginJar, List<HostComponentRegistration> regs); File transform(PluginArtifact pluginArtifact, List<HostComponentRegistration> regs);  }### Answer:
@Test public void testGenerateCacheName() throws IOException { File tmp = File.createTempFile("asdf", ".jar", tmpDir); assertTrue(DefaultPluginTransformer.generateCacheName(tmp).endsWith(".jar")); tmp = File.createTempFile("asdf", "asdf", tmpDir); assertTrue(DefaultPluginTransformer.generateCacheName(tmp).endsWith(String.valueOf(tmp.lastModified()))); tmp = File.createTempFile("asdf", "asdf.", tmpDir); assertTrue(DefaultPluginTransformer.generateCacheName(tmp).endsWith(String.valueOf(tmp.lastModified()))); tmp = File.createTempFile("asdf", "asdf.s", tmpDir); assertTrue(DefaultPluginTransformer.generateCacheName(tmp).endsWith(String.valueOf(".s"))); }