Update type conversions in tests for Go 1