Add tests for encoding/decoding of max/min int32
Add missing scanner test