Added tests for InPlaceGenMat