add tests for HeapArray and OffHeapArray