@Test
public void testGetFileExtension() {

    File single = new File("/somepath/somefile.txt");
    assertThat(getFileExtension(single)).isEqualTo("txt");
    File douple = new File("/somepath/somefile.tar.gz");
    assertThat(getFileExtension(douple)).isEqualTo("tar.gz");
    File none = new File("/somepath/somefile");
    assertThat(getFileExtension(none)).isEqualTo("");
    File dots = new File("/somepath/somefile.with.dots.mp3");
    assertThat(getFileExtension(dots)).isEqualTo("mp3");
    File dotsdouble = new File("/somepath/samefile.with.dots.tar.gz");
    assertThat(getFileExtension(dotsdouble)).isEqualTo("tar.gz");
    File spaces = new File("/somepath/samefile with spaces.mp3");
    assertThat(getFileExtension(spaces)).isEqualTo("mp3");
}