use of org.graylog.plugins.pipelineprocessor.ast.expressions.StringExpression in project graylog2-server by Graylog2.
the class CEFParserFunctionTest method evaluate_returns_null_for_empty_CEF_string.
@Test
public void evaluate_returns_null_for_empty_CEF_string() throws Exception {
final Map<String, Expression> arguments = Collections.singletonMap(CEFParserFunction.VALUE, new StringExpression(new CommonToken(0), ""));
final FunctionArgs functionArgs = new FunctionArgs(function, arguments);
final Message message = new Message("__dummy", "__dummy", DateTime.parse("2010-07-30T16:03:25Z"));
final EvaluationContext evaluationContext = new EvaluationContext(message);
final CEFParserResult result = function.evaluate(functionArgs, evaluationContext);
assertNull(result);
}
Aggregations