@Test
public void visitSingleFieldConstraint() {

    Map<InterpolationVariable, Integer> variableMap = new HashMap<>();
    RuleModelVisitor visitor = new RuleModelVisitor(variableMap);
    SingleFieldConstraint singleFieldConstraint = new SingleFieldConstraint();
    singleFieldConstraint.setConstraintValueType(BaseSingleFieldConstraint.TYPE_TEMPLATE);
    singleFieldConstraint.setFieldType("fieldType");
    singleFieldConstraint.setFieldName("fieldName");
    singleFieldConstraint.setValue("value");
    singleFieldConstraint.setOperator("==");
    visitor.visit(singleFieldConstraint);
    assertEquals(1, variableMap.keySet().size());
    InterpolationVariable interpolationVariable = variableMap.keySet().iterator().next();
    assertEquals("value", interpolationVariable.getVarName());
    assertEquals("fieldName", interpolationVariable.getFactField());
    assertEquals("fieldType", interpolationVariable.getDataType());
    assertEquals("==", interpolationVariable.getOperator());
}