Added support for random matrices testing.