ExprCollectionValue extends AbstractExprValue { @Override public List<ExprValue> collectionValue() { return valueList; }  @Override Object value(); @Override ExprType type(); @Override List<ExprValue> collectionValue(); @Override String toString(); @Override boolean equal(ExprValue o); @Override int compare(ExprValue other); @Override int hashCode();  }
@Test public void equal_to_itself() { ExprValue value = ExprValueUtils.collectionValue(ImmutableList.of(1)); assertTrue(value.equals(value)); }
@Test public void collection_compare_int() { ExprValue intValue = ExprValueUtils.integerValue(10); ExprValue value = ExprValueUtils.collectionValue(ImmutableList.of(1)); assertFalse(value.equals(intValue)); }
@Test public void compare_collection_with_different_size() { ExprValue value1 = ExprValueUtils.collectionValue(ImmutableList.of(1)); ExprValue value2 = ExprValueUtils.collectionValue(ImmutableList.of(1, 2)); assertFalse(value1.equals(value2)); assertFalse(value2.equals(value1)); }
@Test public void compare_collection_with_int_object() { ExprValue value = ExprValueUtils.collectionValue(ImmutableList.of(1)); assertFalse(value.equals(1)); }