private void testFlowPaths(String flowName, String... nodes) throws Exception
{
String[] expectedPaths = generatePaths(flowName, nodes);
FlowConstruct flow = getFlowConstruct(unescape(flowName));
DefaultMessageProcessorPathElement flowElement = new DefaultMessageProcessorPathElement(null, flowName);
((Pipeline) flow).addMessageProcessorPathElements(flowElement);
Map<MessageProcessor, String> messageProcessorPaths = NotificationUtils.buildPaths(flowElement);
String[] flowPaths = messageProcessorPaths.values().toArray(new String[]{});
Assert.assertArrayEquals(expectedPaths, flowPaths);
}