Added new tests for matrix