EvaluateURIActionHandler extends ProcessorActionHandler { @Override public List<ConfigMessage> init(Processor processor) { List<ConfigMessage> configMessages = super.init(processor); EvaluateURIAction action = (EvaluateURIAction) getAction(); if (action.getTemplate() == null || action.getTemplate().trim().isEmpty()) { String message = "Template must be specified"; log.severe(processor.getDescription() + ":" + getAction().getDescription() + ":" + message); ConfigMessage configMessage = new ConfigMessage(); configMessage.setSeverity(Severity.Error); configMessage.setMessage(message); configMessage.setField("template"); configMessage.setProcessor(processor.getDescription()); configMessage.setAction(action.getDescription()); configMessages.add(0, configMessage); } return configMessages; } EvaluateURIActionHandler(ProcessorAction action); @Override List<ConfigMessage> init(Processor processor); @Override boolean process(Trace trace, Node node, Direction direction, Map<String, ?> headers,
            Object[] values); static final String TEMPLATE_MUST_BE_SPECIFIED; }
@Test public void testNoTemplate() { EvaluateURIAction action = new EvaluateURIAction(); EvaluateURIActionHandler handler = new EvaluateURIActionHandler(action); handler.init(new Processor()); }