added a test for generateIndexMatrix2D