diff --git a/oide/client/oide/components/filesystemservice/filesystemservice.spec.js b/oide/client/oide/components/filesystemservice/filesystemservice.spec.js
index <HASH>..<HASH> 100644
--- a/oide/client/oide/components/filesystemservice/filesystemservice.spec.js
+++ b/oide/client/oide/components/filesystemservice/filesystemservice.spec.js
@@ -84,6 +84,9 @@ describe('oide.filesystemservice', function(){
       httpBackend.when('DELETE', /\/filebrowser\/localfiles.*/).respond(function(){
         return [200, {'result': 'DELETED file'}];
       });
+      httpBackend.whenGET(/\/filebrowser\/a\/fileutil\?filepath=.*&operation=GET_NEXT_DUPLICATE/).respond(function(){
+        return [200, {'filepath': '/home/saurabh/Untitled12'}];
+      });
     }));
 
     describe('Functionality of FilesystemService', function(){
@@ -123,5 +126,12 @@ describe('oide.filesystemservice', function(){
         });
         httpBackend.flush();
       });
+      it('should be able to get the next duplicate filename', function(){
+        $filesystemservice.getNextDuplicate(files[0].filepath, function(data){
+          expect(data.originalFile).toBeDefined();
+          expect(data.filepath).toBe('/home/saurabh/Untitled12');
+        });
+        httpBackend.flush();
+      });
     });
 });
add spec to get next duplicate file