Added tests for modules API endpoint

Change-Id: Idff69879d606bb5d71f4a5582f482236bfaa8613
Merge "Added tests for modules API endpoint"