### Question:
StringHelper { public static String removeFileEnding(String fileName) { for (String fileEnding : Constants.ACCEPTED_FILE_ENDINGS_ARRAY) { if (fileName.endsWith(fileEnding)) { return fileName.substring(0, fileName.length() - 4); } } return fileName; }  static String removeFileEnding(String fileName);  }### Answer:
@Test public void testRemoveFileEndingCorrectEnding() { String fileName = "something.tsv"; String expectedFileName = "something"; String actualFileName = StringHelper.removeFileEnding(fileName); assertEquals(expectedFileName, actualFileName); }
@Test public void testRemoveFileEndingWrongEnding() { String fileName = "something.txt"; String expectedFileName = "something.txt"; String actualFileName = StringHelper.removeFileEnding(fileName); assertEquals(expectedFileName, actualFileName); }