tests for a cached matrix