Salesforce-MuleSoft-Developer-II Exam Questions With Explanations

The best unofficial Salesforce-MuleSoft-Developer-II exam questions with research based explanations of each question will help you Prepare & Pass the exam for FREE!

Over 15K Students have given a five star review to SalesforceKing

Why choose our Practice Test

By familiarizing yourself with the Salesforce-MuleSoft-Developer-II exam format and question types, you can reduce test-day anxiety and improve your overall performance.

Up-to-date Content

Ensure you're studying with the latest exam objectives and content.

Unlimited Retakes

We offer unlimited retakes, ensuring you'll prepare each questions properly.

Realistic Exam Questions

Experience exam-like questions designed to mirror the actual Salesforce-MuleSoft-Developer-II test.

Targeted Learning

Detailed explanations help you understand the reasoning behind correct and incorrect answers.

Increased Confidence

The more you practice, the more confident you will become in your knowledge to pass the exam.

Study whenever you want, from any place in the world.

Salesforce Salesforce-MuleSoft-Developer-II Exam Sample Questions 2025

Start practicing today and take the fast track to becoming Salesforce Salesforce-MuleSoft-Developer-II certified.

2604 already prepared
Salesforce Spring 25 Release
60 Questions
4.9/5.0

Refer to the exhibit.

Based on the code snippet, schema,json file, and payload below, what is the outcome of the given code snippet when a request is sent with the payload?

A. The Mule flow will execute successfully with status code 200, and the response will be the JSON sent in request

B. The Mule flow will execute successfully with status code 204

C. The Mule flow will throw the exception ‘JSON:SCHEMA_NOT_HONOURED

D. The Mule flow will execute successfully with status code 200m and a response will display themessage ‘’ Age in years which must equal to or greater than zero.’’

C.   The Mule flow will throw the exception ‘JSON:SCHEMA_NOT_HONOURED

Explanation:

Let’s analyze this Mule flow step by step to determine the outcome when a request is sent with the provided payload! The exhibit shows a Mule flow named Validate-JsonFlow that listens on the /validate endpoint, processes a JSON payload, and includes a schema validation step. We’ll examine the code snippet, the schema reference, and the payload to figure out what happens. The flow starts with an HTTP Listener configured at localhost:8081/validate, accepting a JSON payload. The payload provided is:

{
"firstName": "John",
"lastName": "Doe",
"age": -1
}

The flow includes a validate-schema component with a reference to a schema file (schema.json) located at https://example.com/person_schema.json, which also references a JSON schema draft (https://json-schema.org/draft/2020-12/schema). Additionally, there’s a logger set to log "message is processed successfully" at the INFO level. The validate-schema component checks the payload against the schema, and we need to determine if it passes or fails based on the schema rules.

The schema file isn’t fully shown, but the validate-schema component typically enforces constraints defined in the referenced schema.json. A common constraint for an age field in a person schema is that it must be a non-negative number (i.e., greater than or equal to zero). The payload has an age of -1, which violates this likely constraint. Let’s assume the schema includes a rule like "minimum": 0 for the age field, which is standard for age validation.

In Mule, the validate-schema processor checks the payload against the schema. If the payload doesn’t conform (e.g., age is -1 when it should be >= 0), it throws a JSON:SCHEMA_NOT_HONOURED exception. The flow doesn’t show an error handler to catch this, so the exception would propagate, causing the flow to fail rather than proceed to the logger or return a success status.

Now, let’s evaluate the options:

❌ A. The Mule flow will execute successfully with status code 200, and the response will be the JSON sent in request
If the schema validation fails due to age: -1, the flow won’t execute successfully—it would throw an exception instead. A 200 status implies success, which doesn’t match here. This is incorrect.

❌ B. The Mule flow will execute successfully with status code 204
A 204 status indicates a successful request with no content, but the flow would stop at the schema validation failure. Without an error handler to suppress the exception and force a 204, this isn’t the outcome. This is incorrect.

✅ C. The Mule flow will throw the exception ‘JSON:SCHEMA_NOT_HONOURED’
This aligns with the behavior of validate-schema. Since the payload’s age: -1 likely violates the schema’s minimum value constraint, the processor will raise a JSON:SCHEMA_NOT_HONOURED exception, halting the flow. This fits the scenario perfectly.

❌ D. The Mule flow will execute successfully with status code 200 and a response will display the message ‘’ Age in years which must equal to or greater than zero.’’
For this to happen, the flow would need an error handler or custom logic to catch the schema violation, log the message, and return a 200 status. The current flow lacks such a handler—it only has a logger for success. This isn’t the default behavior, so this is incorrect.

The schema validation failure due to age: -1 triggers the exception, and without an error handler to mitigate it, the flow stops. The logger won’t execute because it’s after the validation step, and no success response is sent.

✅ Answer: C
The validate-schema component checks the payload against the schema.json file. The payload’s age: -1 likely violates a schema constraint requiring age to be greater than or equal to zero, causing the validate-schema processor to throw a JSON:SCHEMA_NOT_HONOURED exception. Without an error handler, the flow fails at this point, preventing further execution.

Reference: MuleSoft Documentation on Schema Validation and Error Handling.

A company with MuleSoft Titanium develops a Salesforce System API using MuleSoft outof- the-box Salesforce Connector and deploys the API to CloudHub. Which steps provide the average number of requests and average response time of the Salesforce Connector?

A. Access Anypoint Monitoring’s built-in dashboard. Select a resource.
Locate the information under the Connectors tab.

B. Access Anypoint Monitoring’s built-in dashboard
Select a resource.
Create a custom dashboard to retrieve the information.

C. Access Anypoint Monitoring built-in dashboard.
Select a resource.
Locate the information under Log Manager < Raw Data.

D. Change the API Implementation to capture the information in the log.
Retrieve the information from the log file.

A.   Access Anypoint Monitoring’s built-in dashboard. Select a resource.
Locate the information under the Connectors tab.

Explanation:

MuleSoft Titanium subscription includes Anypoint Monitoring (Advanced), which provides rich observability features, including:

➟ Built-in dashboards
➟ Per-connector metrics
➟ Response times
➟ Number of requests
➟ Error rates

When using Anypoint Monitoring’s built-in dashboard for a deployed app (e.g., your Salesforce System API on CloudHub), you can:

1. Select the deployed application from the monitoring dashboard.
2. Navigate to the "Connectors" tab.
3. View per-connector metrics like:
➟ Average number of requests
➟ Average response time
➟ Failures per minute

This provides the required information without writing custom code or logs.

❌ Why other options are incorrect:

B. Create a custom dashboard
🔸 Incorrect: Custom dashboards are optional and used for specific KPIs or cross-app metrics. Built-in dashboards already provide connector-level insights.

C. Locate information under Log Manager → Raw Data
🔸 Incorrect: Raw logs provide event-level data, not aggregate metrics like average response time or request counts.

D. Change the API implementation to log the information
🔸 Incorrect: Manually logging metrics is error-prone and unnecessary when using Titanium’s built-in monitoring.

🔗 Reference:

MuleSoft Docs – Anypoint Monitoring (Titanium)
Monitoring Connectors in CloudHub

The HTTP Request operation raises an HTTP CONNECTIVITY error. Which HTTP status code and body are returned to the web client?

A. HTTP Status Code:200.
Body ‘Error in processing your request

B. HTTP Status Code:500.
Body ‘The HTTP CONNECTIVITY Error description

C. HTTP Status Code:500.
Body ‘Error in processing your request

D. HTTP Status Code:500.
Body ‘Error in processing your request

C.   HTTP Status Code:500.
Body ‘Error in processing your request

Explanation:

✅ Correct Answer: C. HTTP Status Code: 500, Body: ‘Error in processing your request’
When an HTTP Request operation in a Mule flow raises an HTTP:CONNECTIVITY error, it indicates a failure to connect to the target API (e.g., due to network issues, timeout, or an unreachable server). In MuleSoft, unhandled errors like HTTP:CONNECTIVITY in a flow typically result in a 500 (Internal Server Error) status code being returned to the web client, as the error originates from the server’s inability to process the request. Unless customized, Mule’s default error handling for such connectivity errors generates a response with a generic error message, such as “Error in processing your request,” in the response body. MuleSoft’s documentation on error handling (Mule 4) confirms that connectivity errors from the HTTP Request operation map to a 500 status code with a generic error message when no specific error handler overrides the default behavior.

❌ Incorrect Answers:

❌ A. HTTP Status Code: 200, Body: ‘Error in processing your request’
An HTTP status code 200 (OK) indicates a successful request, which is not applicable when an HTTP:CONNECTIVITY error occurs, as the request to the target API failed. Returning a 200 status with an error message would be misleading and violate HTTP protocol semantics. MuleSoft’s HTTP Connector documentation clarifies that errors like HTTP:CONNECTIVITY do not result in a successful (200) response but instead trigger server-side error codes like 500.

❌ B. HTTP Status Code: 500, Body: ‘The HTTP CONNECTIVITY Error description’
While an HTTP status code 500 is correct for an HTTP:CONNECTIVITY error, the body “The HTTP CONNECTIVITY Error description” is not the default message returned by MuleSoft. The default error response for unhandled errors in Mule includes a generic message like “Error in processing your request” unless a custom error handler is configured to provide a specific message. MuleSoft’s error handling documentation specifies that the default error response body is generic and does not include the specific error type (e.g., HTTP:CONNECTIVITY) unless explicitly customized.

❌ D. HTTP Status Code: 500, Body: ‘Error in processing your request’
This option is identical to option C in both status code and body, suggesting a typo in the question (as multiple correct answers are unusual in such formats). Since option C is already identified as correct based on MuleSoft’s default behavior for HTTP:CONNECTIVITY errors, option D is redundant and likely included in error. For clarity, the explanation aligns with option C as the intended correct answer, as it matches Mule’s default error response behavior.

🧩 Additional Context:
The HTTP:CONNECTIVITY error occurs when the Mule HTTP Request operation cannot establish a connection to the target API, which is a server-side issue. Without a custom error handler in the Mule flow to map the error to a different status code or message, the default behavior is to return a 500 status code with a generic error message to the client. This aligns with standard REST API practices for server errors, as outlined in HTTP/1.1 specifications (RFC 7231).

🧩 Summary:
Option C is correct because an HTTP:CONNECTIVITY error in the HTTP Request operation results in an HTTP 500 (Internal Server Error) status code with a default body of “Error in processing your request” when no custom error handling is configured. Options A (200 status), B (incorrect body), and D (redundant) are incorrect, as they do not reflect Mule’s default error response for connectivity issues.

ℹ️ References:
MuleSoft Documentation: Error Handling (Mule 4) – Describes how unhandled errors like HTTP:CONNECTIVITY map to a 500 status code with a generic error message.
MuleSoft Documentation: HTTP Connector (Mule 4) – Notes that HTTP:CONNECTIVITY errors indicate server-side connection failures, resulting in 500 responses by default.
RFC 7231: HTTP/1.1 Semantics and Content – Defines 500 as the status code for internal server errors, applicable to connectivity failures.

In a Mule project, Flow-1 contains a flow-ref to Flow-2 depends on data from Flow-1 to execute successfully. Which action ensures the test suites and test cases written for Flow-1 and Flow-2 will execute successfully?

A. Chain together the test suites and test cases for Flow-1 and Flow-2

B. Use ‘’Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent

C. Use ‘’Before Test Case’’ To collect data from Flow-1 test cases before running Flow-2 test cases

D. Use ‘After Test Case’ to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases

B.   Use ‘’Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent

Explanation:

In MuleSoft testing with MUnit, each flow should ideally be tested independently to ensure unit test isolation. If Flow-1 calls Flow-2 using a flow-ref, and Flow-2 depends on some data from Flow-1, then:
➡️ You should not chain the flows during testing.
➡️ Instead, use MUnit’s Set Event processor in the test for Flow-2 to simulate the input event that Flow-2 would receive from Flow-1.
➡️ This approach keeps each flow’s test isolated, repeatable, and easy to debug.

The purpose of Set Event is to:
➡️ Set payload, variables, and attributes manually.
➡️ Mimic exactly what Flow-2 expects as input.

❌ Why the other options are incorrect:

A. Chain together the test suites and test cases for Flow-1 and Flow-2
🔸 Incorrect: This violates the unit testing principle. It makes tests interdependent, harder to maintain, and prone to cascading failures.

C. Use ‘Before Test Case’ to collect data from Flow-1 test cases before running Flow-2 test cases
🔸 Incorrect: Before Test Case is for setup logic like initializing variables — not for calling or chaining flows.

D. Use ‘After Test Case’ to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases
🔸 Incorrect: After Test Case is used for teardown/cleanup — not suitable for passing test data across test cases.

🔗 Reference:
MuleSoft Docs – MUnit Set Event
Best Practices for Unit Testing in MuleSoft

Which statement is true when using XML SDK for creating custom message processors?

A. Properties are fields defined by an end user of the XML SDK component and serve as a global configuration for the entire Mule project inwhich they are used

B. An XML SDK provides both inbound and outbound operations

C. Operations can be reused in recursive calls

D. All operations are public

A.   Properties are fields defined by an end user of the XML SDK component and serve as a global configuration for the entire Mule project inwhich they are used

Explanation:

✅ Correct Answer: A. Properties are fields defined by an end user of the XML SDK component and serve as a global configuration for the entire Mule project in which they are used
In MuleSoft’s XML SDK, properties are defined by the end user of a custom XML SDK component (module) and act as global configuration parameters for the entire Mule project. These properties, specified in the module’s XML configuration, allow users to set values (e.g., API keys, connection details) that are accessible across all operations within the module in the project. This makes them ideal for defining reusable, project-wide settings. MuleSoft’s documentation on the XML SDK (Mule 4) explains that properties are user-defined fields in the module’s XML descriptor, used to configure the module globally for the Mule application.

❌ Incorrect Answers:

❌ B. An XML SDK provides both inbound and outbound operations
The XML SDK in MuleSoft is designed to create custom modules with operations (message processors) and configurations, but it does not inherently provide both inbound and outbound operations. Inbound operations (e.g., listening for incoming messages) are typically handled by connectors or sources, while XML SDK modules focus on processing operations (e.g., transformations or API calls). Creating inbound operations requires specific source implementations, which are not a default feature of the XML SDK. MuleSoft’s XML SDK documentation clarifies that modules are primarily for custom operations, not automatically for inbound/outbound message flows.

❌ C. Operations can be reused in recursive calls
The XML SDK does not natively support recursive calls for operations within a module. While operations can be reused across flows in a Mule application, recursive calls (an operation calling itself) are not supported due to the risk of infinite loops and stack overflow issues in the Mule runtime. MuleSoft’s documentation on XML SDK module development warns against recursive patterns and recommends alternative designs, such as iterative processing, to achieve similar functionality.

❌ D. All operations are public
Not all operations in an XML SDK module are inherently public. The visibility of operations depends on their definition in the XML SDK module. Operations can be marked as internal (private) to restrict their use within the module, or public to allow external access in Mule flows. MuleSoft’s XML SDK documentation specifies that developers control operation visibility through the module’s XML configuration, allowing for both public and internal operations.

Summary:
Option A is correct because XML SDK properties are user-defined fields that provide global configuration for a Mule project using the custom module. Options B (inbound/outbound operations), C (recursive calls), and D (all operations public) are incorrect because the XML SDK does not inherently provide inbound/outbound operations, does not support recursive calls, and allows control over operation visibility.

ℹ️ References:
MuleSoft Documentation: XML SDK – Describes properties as user-defined global configuration fields for XML SDK modules.
MuleSoft Documentation: Create a Custom Module Using XML SDK – Clarifies that modules focus on custom operations, not necessarily inbound/outbound flows, and details operation visibility control.
MuleSoft Help Center: XML SDK Development – Notes that recursive calls are not supported and recommends alternative approaches for complex processing.

Prep Smart, Pass Easy Your Success Starts Here!

Transform Your Test Prep with Realistic Salesforce-MuleSoft-Developer-II Exam Questions That Build Confidence and Drive Success!