Added a test for the method newfiles

Change-Id: I2c6994add3834417c47d397f21125f2d03b57f53