@Test
public void shouldNotMoveHigherThanUsedVariables() {

    final FieldConstraint[] fieldConstraints = new FieldConstraint[2];
    final SingleFieldConstraint top = new SingleFieldConstraint();
    top.setFieldBinding("a");
    fieldConstraints[0] = top;
    final SingleFieldConstraint bottom = new SingleFieldConstraint();
    bottom.setConstraintValueType(BaseSingleFieldConstraint.TYPE_VARIABLE);
    bottom.setValue("a");
    fieldConstraints[1] = bottom;
    FieldConstraintArrayUtil.moveUp(1, fieldConstraints);
    assertEquals(top, fieldConstraints[0]);
    assertEquals(bottom, fieldConstraints[1]);
}