test matrix class