@Test
public void testBetween() {

    AbstractColumn c = column();
    assertEquals(getReferName() + " BETWEEN ? AND ?", c.between(value, value).build(bc));
    assertBetweenParam(c.between(value, value));
    assertFail(c.between(nullValue, value));
    assertFail(c.between(nullValue, nullValue));
    assertFail(c.between(value, nullValue));
    assertBetweenDef(c.between(var("var1"), var("var2")), "var1", "var2", type);
    
    try {
        c.between(var("var1", type2), var("var2"));
        fail();
    }catch (Exception e) {}
    try {
        c.between(var("var1"), var("var2", type2));
        fail();
    }catch (Exception e) {}
    assertBetweenDef(c.between(VAR, var("var2")), "VAR", "var2", type);
    assertBetweenDef(c.between(var("var1"), VAR), "var1", "VAR", type);
    assertBetweenDef(c.between(VAR, VAR), "VAR", "VAR", type);
}