WriterTest: Fix bounds check

Because of 0-based indexing, we need to make sure the index is
not equal to the number of elements in the array.

Test: TreeHugger
Change-Id: I9662d4a67cdfebb0c890c65a35a2456cd3af001b
1 file changed