public void returnsInsertAutoGeneratedKeysOutputMetadata() throws Exception
{
Flow flowConstruct = (Flow) muleContext.getRegistry().lookupFlowConstruct("insertAutoGeneratedKeysMetadata");
List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
Result<MetaData> outputMetaData = queryMessageProcessor.getOutputMetaData(null);
DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
assertEquals(ArrayList.class.getName(), listMetaDataModel.getImplementationClass());
DefaultParameterizedMapMetaDataModel mapMetaDataModel = (DefaultParameterizedMapMetaDataModel) listMetaDataModel.getElementModel();
assertEquals(DataType.STRING, mapMetaDataModel.getKeyMetaDataModel().getDataType());