Bugfix 2470

Please look at the test code closely because I didn't write OpenCV tests in a while and never used ArrayTest before.