if (thenApplyTransformer != null && thenApplyTransformer instanceof AbstractMessageTransformer)
{
mocker().when(getName(messageProcessor))
.ofNamespace(getNamespace(messageProcessor))
.withAttributes(createAttributes(withAttributes))
.thenApply(new MunitMuleMessageTransformer((AbstractMessageTransformer) thenApplyTransformer));
}
else
{
MunitMuleMessage munitMuleMessage = thenReturn == null ? new MunitMuleMessage() : thenReturn;