### Question:
Medias { public static Media getWithSuffix(Media media, String suffix) { Check.notNull(media); Check.notNull(suffix); final String path = media.getPath(); final int dotIndex = path.lastIndexOf(Constant.DOT); if (dotIndex > -1) { return Medias.create(path.substring(0, dotIndex) + Constant.UNDERSCORE + suffix + path.substring(dotIndex)); } return Medias.create(path + Constant.UNDERSCORE + suffix); } private  Medias(); static synchronized Media create(String... path); static synchronized void setFactoryMedia(FactoryMedia factoryMedia); static synchronized void setResourcesDirectory(String directory); static synchronized void setLoadFromJar(Class<?> clazz); static synchronized Media get(File file); static synchronized List<Media> getByExtension(String extension, Media folder); static List<Media> getByExtension(File jar, String fullPath, int prefixLength, String extension); static Media getWithSuffix(Media media, String suffix); static synchronized String getResourcesDirectory(); static synchronized Optional<Class<?>> getResourcesLoader(); static synchronized File getJarResources(); static synchronized String getJarResourcesPrefix(); static String getSeparator();  }### Answer:
@Test void testGetWithSuffix() { Medias.setResourcesDirectory(oldDir); final Media folder = Medias.create("folder", "foo"); final Media file = Medias.create("folder", "file.txt"); assertEquals(Medias.create("folder", "foo_suffix"), Medias.getWithSuffix(folder, "suffix")); assertEquals(Medias.create("folder", "file_suffix.txt"), Medias.getWithSuffix(file, "suffix")); }