Added tests for GenMat, GenMat