如何在MUnit中使用“mock When”模拟“MuleSoft任意点交换”自定义API连接器?

如何在MUnit中使用“mock When”模拟“MuleSoft任意点交换”自定义API连接器?,mule,mule-esb,munit,Mule,Mule Esb,Munit,我正在为Proc层实现流编写Munit,该实现流使用exchangeapi连接器调用syslayer POST端点。syslayer RAML在Exchange中发布以生成其连接器。当我为API连接器添加“Mock When”时,它不会模拟连接器并尝试调用实际的API端点 我尝试了“Mock-When”,给出了处理器和API连接器的doc:id和doc:name 下面是我的API连接器XML代码 <ol-smart-sys-property:create-announcement-by-c

我正在为Proc层实现流编写Munit,该实现流使用exchangeapi连接器调用syslayer POST端点。syslayer RAML在Exchange中发布以生成其连接器。当我为API连接器添加“Mock When”时,它不会模拟连接器并尝试调用实际的API端点

我尝试了“Mock-When”,给出了处理器和API连接器的doc:id和doc:name

下面是我的API连接器XML代码

<ol-smart-sys-property:create-announcement-by-code doc:name="Create announcement by code" doc:id="88b6e101-5999-4b11-b2ed-aeaee9ae5bd4" code="#[vars.code]" config-ref="Ol_smart_sys_property_Config"/>
下面是模拟XML代码

<munit-tools:mock-when doc:name="Mock when" doc:id="8421e6fc-564e-44ea-94fe-78edbd1a979d" processor="ol-smart-sys-property:create-announcement-by-code">
    <munit-tools:with-attributes >
        <munit-tools:with-attribute attributeName="doc:id" whereValue="88b6e101-5999-4b11-b2ed-aeaee9ae5bd4" />
    </munit-tools:with-attributes>
    <munit-tools:then-return ></munit-tools:then-return>
</munit-tools:mock-when>
删除模拟的“带属性”部分是否可行?我相信运行时中存在一个bug,它使得基于Raml的连接器在指定属性时无法被MUnit模仿