private void doUnresolvedMetadataTest(String flowName) {
    Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct(flowName);

    List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
    AbstractSingleQueryDbMessageProcessor queryMessageProcessor =
        (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
    Result<MetaData> inputMetaData = queryMessageProcessor.getInputMetaData();

    assertThat(inputMetaData, equalTo(null));
  }
  private IdempotentMessageFilter idempotentMessageFilterFromFlow(final String flowName)
      throws Exception {
    final FlowConstruct flow = getFlowConstruct(flowName);
    assertTrue(flow instanceof Flow);

    final Flow simpleFlow = (Flow) flow;
    final List<MessageProcessor> processors = simpleFlow.getMessageProcessors();
    assertEquals(1, processors.size());

    final MessageProcessor firstMP = processors.get(0);
    assertEquals(IdempotentMessageFilter.class, firstMP.getClass());

    return (IdempotentMessageFilter) firstMP;
  }
 protected MessageProcessor lookupMessageProcessorFromFlow(String serviceName) throws Exception {
   Flow service = lookupFlow(serviceName);
   List<MessageProcessor> routers = service.getMessageProcessors();
   assertEquals(1, routers.size());
   return routers.get(0);
 }
 protected MessageProcessor lookupCustomRouterFromFlow(String serviceName) throws Exception {
   Flow service = lookupFlow(serviceName);
   return service.getMessageProcessors().get(0);
 }