Added tests for matrices