diff --git a/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java b/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java index d398e93677..7510f343cd 100644 --- a/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java +++ b/gson/src/test/java/com/google/gson/functional/CustomTypeAdaptersTest.java @@ -125,7 +125,8 @@ public void testCustomNestedSerializers() { } }).create(); ClassWithCustomTypeConverter target = new ClassWithCustomTypeConverter(); - assertThat(gson.toJson(target)).isEqualTo("{\"bag\":6,\"value\":10}"); + String targetStr = gson.toJson(target); + assertThat(targetStr.equals("{\"bag\":6,\"value\":10}") || targetStr.equals("{\"value\":10,\"bag\":6}")).isTrue(); } @Test