SmartlingFileUtils { public static Pattern getFilePattern(String repositoryName) { return Pattern.compile(repositoryName + "/(\\d+)_(singular|plural)_source.xml"); } private  SmartlingFileUtils(); static String getOutputSourceFile(long batchNumber, String repositoryName, String prefix); static String getOutputTargetFile(long batchNumber, String repositoryName, String prefix, String locale); static Pattern getFilePattern(String repositoryName); static Boolean isPluralFile(String fileUri);  }
@Test public void testGetFilePattern() { Pattern webappmigration = SmartlingFileUtils.getFilePattern("repositoryName"); assertThat(webappmigration.matcher("repositoryName/0000_singular_source.xml").matches()).isTrue(); assertThat(webappmigration.matcher("repositoryName/0000_plural_source.xml").matches()).isTrue(); assertThat(webappmigration.matcher("someotherrepo/0000_plural_source.xml").matches()).isFalse(); assertThat(webappmigration.matcher("something").matches()).isFalse(); }