fix body access in test client

See #360.