@Test
public void testGetExtensionOnFilenameAndIsGreedy() {

  final Object[][] testParameters =
      new Object[][] {{"HelloWorld.png", false, "png"}, {"HelloWorld.jpg", true, "jpg"},
          {"Hello.World.gif", false, "gif"}, {"Hello.World.bmp", true, "World.bmp"}};
  assertNull(FilenameUtils.getExtension(null, false));
  assertNull(FilenameUtils.getExtension(null, true));
  for (final Object[] testParameter : testParameters) {
    String expected = (String) testParameter[2];
    String filename = (String) testParameter[0];
    boolean isGreedy = (Boolean) testParameter[1];
    assertEquals(expected, FilenameUtils.getExtension(filename, isGreedy));
  }
}