Adding matrix tests.