Fixed compiler error (gcc-4.1.2) in state tests.

Review: https://reviews.apache.org/r/20627