@Test
public void testGetFileExtension() {

    assertNull(Tools.getFileExtension(null));
    assertEquals("", Tools.getFileExtension("file"));
    assertEquals(".txt", Tools.getFileExtension("file.txt"));
    assertEquals(".", Tools.getFileExtension("file."));
    assertEquals(".txt", Tools.getFileExtension(".txt"));
    assertEquals(".", Tools.getFileExtension("."));
    assertEquals(".jpg", Tools.getFileExtension("image.txt.jpg"));
    assertEquals(".extension", Tools.getFileExtension("some thing with spaces.extension"));
}