@Test
public void testHashCodeAndEquals() {

    final List<JsonValue> stringJsonValueList = toList(JsonValue.of("foo"), JsonValue.of("bar"));
    final List<JsonValue> numberJsonValueList = toList(JsonValue.of(1), JsonValue.of(2), JsonValue.of(3));
    final ImmutableJsonArray redArray = ImmutableJsonArray.of(stringJsonValueList);
    final ImmutableJsonArray blackArray = ImmutableJsonArray.of(numberJsonValueList);
    final ImmutableJsonArray.SoftReferencedValueList
            redValueList = ImmutableJsonArray.SoftReferencedValueList.of(stringJsonValueList);
    final ImmutableJsonArray.SoftReferencedValueList
            blackValueList = ImmutableJsonArray.SoftReferencedValueList.of(numberJsonValueList);
    EqualsVerifier.forClass(ImmutableJsonArray.class)
            .withPrefabValues(ImmutableJsonArray.class, redArray, blackArray)
            .withPrefabValues(ImmutableJsonArray.SoftReferencedValueList.class, redValueList, blackValueList)
            .withNonnullFields("valueList")
            .verify();
}