SetPropertyActionHandler extends ExpressionBasedActionHandler { @Override public List<ConfigMessage> init(Processor processor) { List<ConfigMessage> configMessages = super.init(processor); SetPropertyAction action = (SetPropertyAction) getAction(); if (action.getName() == null || action.getName().trim().isEmpty()) { String message = "Name must be specified"; log.severe(processor.getDescription() + ":" + getAction().getDescription() + ":" + message); ConfigMessage configMessage = new ConfigMessage(); configMessage.setSeverity(Severity.Error); configMessage.setMessage(message); configMessage.setField("name"); configMessage.setProcessor(processor.getDescription()); configMessage.setAction(action.getDescription()); configMessages.add(0, configMessage); } return configMessages; } SetPropertyActionHandler(ProcessorAction action); @Override List<ConfigMessage> init(Processor processor); @Override boolean process(Trace trace, Node node, Direction direction, Map<String, ?> headers,
            Object[] values);  }
@Test public void testNoName() { SetPropertyAction action = new SetPropertyAction(); action.setExpression(new LiteralExpression().setValue(TEST_VALUE_1)); SetPropertyActionHandler handler = new SetPropertyActionHandler(action); handler.init(new Processor()); }