add tests for util matrix
Merge pull request #97650 from mauk81/test

add tests for util matrix