### Question:
TimestampNamingStrategy implements NamingStrategy { public String rename(final String originalName, final InputStream inputStream) { final String baseName = FilenameUtils.getBaseName(originalName); final String extension = FilenameUtils.getExtension(originalName); final long timestamp = getTimestamp(); final StringBuilder sb = new StringBuilder(baseName).append("-").append(timestamp); if (!StringUtils.isEmpty(extension)) { sb.append(".").append(extension); } return sb.toString(); }  String rename(final String originalName, final InputStream inputStream); static final String ALIAS; }### Answer:
@Test public void testWithExtension() throws Exception { final String result = namingStrategy.rename("fileName.js", null); assertEquals("fileName-" + TIMESTAMP + ".js", result); }
@Test public void testNoExtension() throws Exception { final String result = namingStrategy.rename("fileName", null); assertEquals("fileName-" + TIMESTAMP, result); }