ValueComparisonHelper { static boolean basicEquals(Object v1, Object v2) { if (v2 != null) { if (v2.getClass().isArray()) { if (v2 instanceof byte[]) { if (v1 instanceof byte[]) { return Arrays.equals((byte[]) v2, (byte[]) v1); } else { return false; } } else if (v2 instanceof Object[]) { if (v1 instanceof Object[]) { return Arrays.deepEquals((Object[]) v2, (Object[]) v1); } else { return false; } } else if (v2 instanceof int[]) { if (v1 instanceof int[]) { return Arrays.equals((int[]) v2, (int[]) v1); } else { return false; } } else if (v2 instanceof long[]) { if (v1 instanceof long[]) { return Arrays.equals((long[]) v2, (long[]) v1); } else { return false; } } else if (v2 instanceof boolean[]) { if (v1 instanceof boolean[]) { return Arrays.equals((boolean[]) v2, (boolean[]) v1); } else { return false; } } else if (v2 instanceof short[]) { if (v1 instanceof short[]) { return Arrays.equals((short[]) v2, (short[]) v1); } else { return false; } } else if (v2 instanceof char[]) { if (v1 instanceof char[]) { return Arrays.equals((char[]) v2, (char[]) v1); } else { return false; } } else if (v2 instanceof float[]) { if (v1 instanceof float[]) { return Arrays.equals((float[]) v2, (float[]) v1); } else { return false; } } else if (v2 instanceof double[]) { if (v1 instanceof double[]) { return Arrays.equals((double[]) v2, (double[]) v1); } else { return false; } } } return v2.equals(v1); } else { return v1 == null; } }  static boolean checkEquals(@Unretained Object v1, @Unretained Object v2,
      boolean isCompressedOffHeap, InternalCache cache);  }
@Test public void basicEqualsCanCompareTwoNullObjects() { assertThat(ValueComparisonHelper.basicEquals(null, null)).isTrue(); }
@Test public void basicEqualsCanCompareWhenOnlyFirstObjectIsNull() { assertThat(ValueComparisonHelper.basicEquals(null, new Object())).isFalse(); }
@Test public void basicEqualsCanCompareWhenOnlySecondObjectIsNull() { assertThat(ValueComparisonHelper.basicEquals(new Object(), null)).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualByteArrays() { assertThat(ValueComparisonHelper.basicEquals(STRING.getBytes(), BYTE_ARRAY)).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualByteArrays() { assertThat(ValueComparisonHelper.basicEquals(STRING.getBytes(), STRING2.getBytes())).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlyFirstObjectIsAByteArray() { assertThat(ValueComparisonHelper.basicEquals(BYTE_ARRAY, INT_ARRAY)).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlySecondObjectIsAByteArray() { assertThat(ValueComparisonHelper.basicEquals(INT_ARRAY, BYTE_ARRAY)).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualIntArrays() { assertThat(ValueComparisonHelper.basicEquals(INT_ARRAY, INT_ARRAY2)).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualIntArrays() { assertThat(ValueComparisonHelper.basicEquals(INT_ARRAY, INT_ARRAY3)).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualLongArrays() { assertThat(ValueComparisonHelper.basicEquals(Arrays.stream(INT_ARRAY).asLongStream().toArray(), Arrays.stream(INT_ARRAY2).asLongStream().toArray())).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualLongArrays() { assertThat(ValueComparisonHelper.basicEquals(Arrays.stream(INT_ARRAY3).asLongStream().toArray(), Arrays.stream(INT_ARRAY2).asLongStream().toArray())).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualBooleanArrays() { assertThat(ValueComparisonHelper.basicEquals(BOOLEAN_ARRAY, BOOLEAN_ARRAY2)).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualBooleanArrays() { assertThat(ValueComparisonHelper.basicEquals(BOOLEAN_ARRAY3, BOOLEAN_ARRAY)).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlyFirstObjectIsABooleanArray() { assertThat(ValueComparisonHelper.basicEquals(BOOLEAN_ARRAY, SHORT_ARRAY)).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlySecondObjectIsABooleanArray() { assertThat(ValueComparisonHelper.basicEquals(SHORT_ARRAY, BOOLEAN_ARRAY)).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualShortArrays() { assertThat(ValueComparisonHelper.basicEquals(SHORT_ARRAY, SHORT_ARRAY2)).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualShortArrays() { assertThat(ValueComparisonHelper.basicEquals(SHORT_ARRAY2, SHORT_ARRAY3)).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualDoubleArrays() { assertThat( ValueComparisonHelper.basicEquals(Arrays.stream(INT_ARRAY).asDoubleStream().toArray(), Arrays.stream(INT_ARRAY2).asDoubleStream().toArray())).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualDoubleArrays() { assertThat( ValueComparisonHelper.basicEquals(Arrays.stream(INT_ARRAY3).asDoubleStream().toArray(), Arrays.stream(INT_ARRAY).asDoubleStream().toArray())).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualCharArrays() throws Exception { assertThat(ValueComparisonHelper.basicEquals(STRING.toCharArray(), (new String(BYTE_ARRAY, "UTF-8")).toCharArray())).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualCharArrays() throws Exception { assertThat(ValueComparisonHelper.basicEquals(STRING2.toCharArray(), (new String(BYTE_ARRAY, "UTF-8")).toCharArray())).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlyFirstObjectIsACharArray() { assertThat(ValueComparisonHelper.basicEquals(STRING.toCharArray(), Arrays.stream(INT_ARRAY).asDoubleStream().toArray())).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlySecondObjectIsACharArray() { assertThat(ValueComparisonHelper .basicEquals(Arrays.stream(INT_ARRAY).asDoubleStream().toArray(), STRING.toCharArray())) .isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualFloatArrays() throws Exception { assertThat(ValueComparisonHelper.basicEquals(FLOAT_ARRAY, FLOAT_ARRAY2)).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualFloatArrays() throws Exception { assertThat(ValueComparisonHelper.basicEquals(FLOAT_ARRAY2, FLOAT_ARRAY3)).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlySecondObjectIsAFloatArray() throws Exception { assertThat(ValueComparisonHelper.basicEquals(STRING, FLOAT_ARRAY3)).isFalse(); }
@Test public void basicEqualsReturnsTrueWhenCompareTwoEqualStringArrays() throws Exception { assertThat(ValueComparisonHelper.basicEquals(STRING_ARRAY, STRING_ARRAY2)).isTrue(); }
@Test public void basicEqualsReturnsFalseWhenCompareTwoNotEqualStringArrays() throws Exception { assertThat(ValueComparisonHelper.basicEquals(STRING_ARRAY, STRING_ARRAY3)).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlyFirstObjectIsAStringArray() { assertThat(ValueComparisonHelper.basicEquals(STRING_ARRAY, Arrays.stream(INT_ARRAY).asLongStream().toArray())).isFalse(); }
@Test public void basicEqualsReturnsFalseWhenOnlySecondObjectIsAStringArray() { assertThat(ValueComparisonHelper .basicEquals(Arrays.stream(INT_ARRAY).asDoubleStream().toArray(), STRING_ARRAY2)).isFalse(); }