Added test for marshalling and unmarshalling ApiRequest.