Removed some redundant test cases
Implemented extension using getFileExtension()