Mulesoft MCD-LEVEL2 Online Practice
Questions and Exam Preparation
MCD-LEVEL2 Exam Details
Exam Code
:MCD-LEVEL2
Exam Name
:MuleSoft Certified Developer - Level 2 (Mule 4)
Certification
:Mulesoft Certifications
Vendor
:Mulesoft
Total Questions
:60 Q&As
Last Updated
:Jul 12, 2026
Mulesoft MCD-LEVEL2 Online Questions &
Answers
Question 51:
Refer to the exhibit.
The flow name is `'implementation'' with code for the MUnit test case.
When the MUnit test case is executed, what is the expected result?
A. The test case fails with an assertion error B. The test throws an error and does not start C. The test case fails with an unexpected error type D. The test case passes
A. The test case fails with an assertion error
Explanation
Based on the code snippet and MUnit test case below, when the MUnit test case is executed, the expected result is that the test case fails with an assertion error. This is because the assert-equals processor compares two values for equality, and fails if they are not equal. In this case, the expected value is `Hello World', but the actual value returned by the implementation flow is `Hello Mule'. Therefore, the assertion fails and an error is thrown.
A mule application exposes and API for creating payments. An Operations team wants to ensure that the Payment API is up and running at all times in production.
Which approach should be used to test that the payment API is working in production?
A. Create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API B. Configure the application to send health data to an external system C. Create a health check endpoint that reuses the same port number and HTTP Listener configuration as the API itself D. Monitor the Payment API directly sending real customer payment data
A. Create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API
Explanation
To test that the payment API is working in production, the developer should create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API. This way, the developer can isolate the health check endpoint from the API traffic and avoid affecting the performance or availability of the API. The health check endpoint should return a simple response that indicates the status of the API, such as OK or ERROR.
A developer generates the base scaffolding for an API in Anypoint Studio. Which HTTP status code is returned while testing using the API Kit console if no values are entered in client-secret?
A. HTTP status code:200 B. HTTP status code:403 C. HTTP status code:400 D. HTTP status code:500
B. HTTP status code:403
Explanation
Based on the code snippet and schema.json file below, when testing using the API Kit console if no values are entered in client-secret, HTTP status code 403 (FORBIDDEN) is returned. This is because client-secret is defined as a required header parameter in schema.json file, which means that it must be present in every request. If no values are entered in client-secret, then it is equivalent to omitting this header parameter, which violates the schema and causes APIKit Router to return HTTP status code 403.
What required changes can be made to give a partial successful response in case the United Airlines API returns with a timeout?
A. Add a Scatter-gather component inside a Try scope. Set the payload to a default value `Error' inside the error handler using the On Error Propagate scope. B. Add Flow Reference components inside a Try scope. Set the payload to a default value'' insider the error handler using the ON Error Continue scope C. Add Flow Reference components inside a Try scope Set the payload to a default value `' inside the error handler using the On Error Propagate scope D. Add a Scatter-Gather component inside a Try scope. Set the payload to a default value `Error'' inside the error handler using the On Error Continue scope.
D. Add a Scatter-Gather component inside a Try scope. Set the payload to a default value `Error'' inside the error handler using the On Error Continue scope.
Explanation
To give a partial successful response in case the United Airlines API returns with a timeout, the developer should add a Scatter-Gather component inside a Try scope, and set the payload to a default value `Error' inside the error handler using the On Error Continue scope. A Scatter-Gather component allows sending multiple requests concurrently and aggregating the responses into an array. A Try scope allows handling errors that occur within it using an error handler. An On Error Continue scope allows continuing the flow execution after handling an error. Therefore, by using these components, the developer can send requests to both APIs in parallel, handle any timeout errors from United Airlines API, and return a partial response with a default value for that API.
A Mule application for processing orders must log the order ID for every log message output.
What is a best practice to enrich every log message with the order ID?
A. Use flow variables within every logger processor to log the order ID B. Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern C. Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector D. Use the Tracing module to set logging variables with a Mapped Diagnostic Context
D. Use the Tracing module to set logging variables with a Mapped Diagnostic Context
Explanation
To enrich every log message with the order ID, the developer should use the Tracing module to set logging variables with a Mapped Diagnostic Context (MDC). The Tracing module allows adding custom key-value pairs to log messages using MDC variables. The developer can use Set Logging Variables operation to set the order ID as an MDC variable and then use it in any logger processor within the same thread or event.
An organization uses CloudHub to deploy all of its applications.
How can a common-global-handler flow be configured so that it can be reused across all of the organization's deployed applications?
A. Create a Mule plugin project Create a common-global-error-handler flow inside the plugin project. Use this plugin as a dependency in all Mute applications. Import that configuration file in Mute applications. B. Create a common-global-error-handler flow in all Mule Applications Refer to it flow-ref wherever needed. C. Create a Mule Plugin project Create a common-global-error-handler flow inside the plugin project. Use this plugin as a dependency in all Mule applications D. Create a Mule daman project. Create a common-global-error-handler flow inside the domain project. Use this domain project as a dependency.
C. Create a Mule Plugin project Create a common-global-error-handler flow inside the plugin project. Use this plugin as a dependency in all Mule applications
Explanation
To configure a common-global-handler flow that can be reused across all of the organization's deployed applications, the developer should create a Mule Plugin project, create a common-global-error-handler flow inside the plugin project, and use this plugin as a dependency in all Mule applications. This way, the developer can import the common-global-error-handler flow in any application that needs it and avoid duplicating the error handling logic.
A Flight Management System publishes gate change notification events whenever a flight's arrival gate changes. Other systems, including Baggage Handler System. Inflight Catering System and Passenger Notifications System, must each asynchronously receive the same gate change notification to process the event according.
Which configuration is required in Anypoint MQ to achieve this publish/subscribe model?
A. Publish each client subscribe directly to the exchange. Have each client subscribe directly to the queue. B. Publish the gate change notification to an Anypoint MC queue Have each client subscribe directly to the queue C. Publish the gate change notification to an Anypoint MQ queue. Create different anypoint MQ exchange meant for each of the other subscribing systems Bind the queue with each of the exchanges D. Publish the gate change notification to an Anypoint MQ exchanhe. Create different Anypoint MQ queues meant for each of the other subscribing systems. Bind the exchange with each of the queues.
D. Publish the gate change notification to an Anypoint MQ exchanhe. Create different Anypoint MQ queues meant for each of the other subscribing systems. Bind the exchange with each of the queues.
Explanation
To achieve a publish/subscribe model using Anypoint MQ, where each system receives the same gate change notification event, the developer should publish the gate change notification to an Anypoint MQ exchange, create different Anypoint MQ queues meant for each of the other subscribing systems, and bind the exchange with each of the queues. An exchange is a message routing agent that can send messages to different queues based on predefined criteria. By binding an exchange with multiple queues, each queue receives a copy of every message sent to that exchange. Therefore, each system can subscribe to its own queue and receive every gate change notification event.
A Mute Object Store is configured with an entry TTL of one second and an expiration interval of 30 seconds.
What is the result of the flow if processing between os'store and os:retrieve takes 10 seconds?
A. nullPayload B. originalPayload C. OS:KEY_NOT_FOUND D. testPayload
A. nullPayload
Explanation
The result of the flow is nullPayload if processing between os:store and os:retrieve takes 10 seconds. This is because the entry TTL of the object store is one second, which means that any stored value expires after one second and is removed from the object store. The expiration interval of 30 seconds only determines how often the object store checks for expired values, but it does not affect the TTL. Therefore, when os:retrieve tries to get the value after 10 seconds, it returns nullPayload because the value has already expired and been removed.
A custom policy needs to be developed to intercept all cutbound HTTP requests made by Mule applications.
Which XML element must be used to intercept outbound HTTP requests?
A. It is not possible to intercept outgoing HTTP requests, only inbound requests B. http-policy:source C. htt-policy:operation D. http-policy:processor
D. http-policy:processor
Explanation
The http-policy:processor element is used to intercept outbound HTTP requests made by Mule applications. It allows customizing the request before it is sent to the target API and modifying the response after it is received from the target API.
A Mule API receives a JSON payload and updates the target system with the payload. The developer uses JSON schemas to ensure the data is valid.
How can the data be validation before posting to the target system?
A. Use a DataWeave 2.09 transform operation, and at the log of the DataWeave script, add: %dw 2.0 Import.json-moduls B. Using the DataWeave if Else condition test the values of the payload against the examples included in the schema C. Apply the JSON Schema policy in API Manager and reference the correct schema in the policy configuration D. Add the JSON module dependency and add the validate-schema operation in the flow, configured to reference the schema
D. Add the JSON module dependency and add the validate-schema operation in the flow, configured to reference the schema
Explanation
To validate the data before posting to the target system, the developer should add the JSON module dependency and add the validate-schema operation in the flow, configured to reference the schema. The JSON module provides a validate-schema operation that validates a JSON payload against a JSON schema and throws an error if the payload is invalid.
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Mulesoft exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your MCD-LEVEL2 exam preparations
and Mulesoft certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.