diff --git a/sdk/test/Services/DynamoDBv2/UnitTests/Custom/DocumentJsonTests.cs b/sdk/test/Services/DynamoDBv2/UnitTests/Custom/DocumentJsonTests.cs index ec24f3f5d434..50988cd5c10c 100644 --- a/sdk/test/Services/DynamoDBv2/UnitTests/Custom/DocumentJsonTests.cs +++ b/sdk/test/Services/DynamoDBv2/UnitTests/Custom/DocumentJsonTests.cs @@ -149,13 +149,14 @@ public void FromJson_Long() [TestMethod] public void ToJson_Long() { + var longValue = long.MaxValue - 100; var document = new Document(); - document["key"] = 9223372036854775806L; + document["key"] = longValue; var json = document.ToJsonPretty(); var expectedJson = $@"{{ - ""key"": 9223372036854775806 + ""key"": {longValue} }}"; Assert.AreEqual(expectedJson, json);