Test: minor refactoring of NDArray test