Skip to main content

Last updated: May 2026

Practice Exam

Mule-Dev-301MuleSoft Certified Developer - Level 2

Test your knowledge with official exam-style questions

Questions25Passing70Exam time120 min

Questions and options are shuffled each attempt

Salesforce Certified MuleSoft Developer IIPractice Exam Set 1: All Questions & Explanations

Full question text, answer options, and explanations for this practice set — a spoiler-free alternative is the interactive quiz above for scored, shuffled practice.

  1. 1. A developer needs to merge two arrays of objects on a common key 'id', similar to a SQL JOIN. Which DataWeave 2.0 approach is most appropriate?

    • A. Use the ++ operator to concatenate both arrays into one
    • B. Use 'map' with 'filter' on the second array to find matching elements and merge using the update operator(correct)
    • C. Use the 'joinBy' function
    • D. Use a Database Join connector operation instead of DataWeave

    Explanation: DataWeave does not have a built-in SQL-style JOIN function. The standard pattern is to 'map' over the first array, then use 'filter' (or a lookup object built with 'groupBy') to find the matching element from the second array by the common key, and merge the two objects using the update/++ operators. For large datasets, building a lookup map with groupBy first avoids O(n²) complexity.

  2. 2. What does the DataWeave 'update' operator do?

    • A. Updates a database record using the result of a DataWeave expression
    • B. Returns a new object with specific key paths replaced by new values while leaving all other keys unchanged(correct)
    • C. Merges two objects, with duplicate keys resolved by keeping the right-hand value
    • D. Mutates the original object in-place at the specified key path

    Explanation: The DataWeave 'update' operator (available in DataWeave 2.3+) returns a new object that is a copy of the input with specific paths overwritten. It is non-destructive (DataWeave is purely functional — values are never mutated). Syntax: payload update {case .status -> 'processed'}. All unspecified keys retain their original values.

  3. 3. A developer needs a reusable DataWeave function across multiple transformation scripts in the same Mule project. How should this be implemented?

    • A. Copy-paste the function into each .dwl file that needs it
    • B. Define the function in a DataWeave module (.dwl) file in src/main/resources/dwl/ and import it with 'import' in each script(correct)
    • C. Define the function as a Mule global configuration element in the XML config
    • D. Store the function as a Mule property in the application properties file

    Explanation: DataWeave supports modular development via module files (.dwl). A shared function is defined in a .dwl module (e.g., src/main/resources/dwl/utils.dwl) and imported using: import functions from dwl::utils. This enables DRY (Don't Repeat Yourself) function reuse across the project without copy-pasting.

  4. 4. Which DataWeave 2.0 features support recursive or complex data transformation patterns? (Select TWO)

    • A. Named functions that call themselves recursively(correct)
    • B. Pattern matching using the 'match' expression(correct)
    • C. The 'foreach' keyword for imperative looping
    • D. The 'eval' function for dynamic expression evaluation

    Explanation: DataWeave supports named recursive functions (a function that calls itself, useful for walking tree structures). The 'match' expression provides pattern matching (similar to switch/case but on types and conditions), enabling complex branching transformations. DataWeave is declarative/functional — there is no imperative 'foreach' loop or 'eval' function.

  5. 5. A developer needs to write a DataWeave script that outputs multiple files: one JSON summary file and one CSV detail file from the same input payload. How is multi-output DataWeave used?

    • A. Use two separate Transform Message components chained in sequence(correct)
    • B. Use the DataWeave 'output application/json, application/csv' directive to produce both at once
    • C. Write a DataWeave module that defines two named outputs and reference them from the Transform Message component
    • D. Wrap the two Transform components in a Scatter-Gather to run them in parallel

    Explanation: DataWeave is single-output: a single Transform Message component produces one output. To produce both a JSON summary and CSV detail from the same input, the developer should use two separate Transform Message components in sequence (or store intermediate results in variables). Multi-output DataWeave scripts are not supported in the standard Mule 4 Transform Message component.

  6. 6. A developer has deployed a Mule API to CloudHub and wants to enforce that only registered client applications can call it. Which API Manager policy should be applied?

    • A. Rate Limiting policy
    • B. HTTP Caching policy
    • C. Client ID Enforcement policy(correct)
    • D. IP Allowlist policy

    Explanation: The Client ID Enforcement policy requires every API request to include a valid client_id and client_secret (or just client_id, depending on configuration) registered in Anypoint Exchange. This gates API access to known, registered consumer applications and is the foundation of client application management in API Manager.

  7. 7. A developer wants to implement OAuth 2.0 token-based access for a Mule API. The authorisation server is an external identity provider. Which API Manager policy should be used?

    • A. Basic Authentication policy
    • B. OAuth 2.0 Access Token Enforcement (using external provider) policy(correct)
    • C. JWT Validation policy
    • D. Client ID Enforcement policy

    Explanation: The OAuth 2.0 Access Token Enforcement policy (using external provider) validates Bearer tokens against an external OAuth 2.0 authorisation server by calling its token introspection endpoint. JWT Validation validates a self-contained JWT without a live server call. Basic Authentication uses username/password. Client ID Enforcement uses client_id/client_secret — a proprietary mechanism, not OAuth 2.0.

  8. 8. A developer adds a Rate Limiting policy to an API: 100 requests per minute. After enabling the policy, callers start receiving HTTP 429 responses. What does HTTP 429 mean in this context?

    • A. The caller's client ID is invalid
    • B. The API has encountered an internal server error
    • C. The caller has exceeded the allowed request rate and the request was rejected by the policy(correct)
    • D. The API is temporarily unavailable for maintenance

    Explanation: HTTP 429 (Too Many Requests) is the standard response code for rate limit violations. The Mule API Manager Rate Limiting policy returns 429 when a client exceeds the configured quota within the time window. The response may include a Retry-After header indicating when the client may retry.

  9. 9. When configuring mutual TLS (mTLS) for a Mule application, which of the following are required? (Select TWO)

    • A. A TLS Context configured with the server's keystore (containing the server's private key and certificate)(correct)
    • B. A TLS Context configured with a truststore (containing the trusted client CA certificates)(correct)
    • C. An API Manager Client ID Enforcement policy applied to the API
    • D. A RAML trait named 'secured' applied to all resources

    Explanation: mTLS requires both sides to present certificates. The server needs a keystore (its own private key + certificate for server authentication) and a truststore (the CA certificates of clients it trusts, for client authentication). Client ID Enforcement and RAML traits are application-layer concerns unrelated to TLS configuration.

  10. 10. A developer configures SLA-based rate limiting in API Manager. What additional step is required for a client application to access the API at a specific SLA tier?

    • A. The client must include a special HTTP header X-SLA-Tier in every request
    • B. The client application must request access to the API at the desired SLA tier via Anypoint Exchange and be approved(correct)
    • C. The API gateway automatically assigns the highest SLA tier to all registered clients
    • D. The developer must hardcode the SLA tier in the Mule application's XML configuration

    Explanation: SLA-based rate limiting combines Client ID Enforcement with tiered quotas. A client application requests API access through Anypoint Exchange, selecting a specific SLA tier (e.g., Bronze: 10 req/s, Gold: 100 req/s). An API admin approves the request. API Manager then enforces the tier's rate limit based on the client's client_id.

  11. 11. What is MUnit in the context of MuleSoft development?

    • A. A load testing tool for measuring API throughput under simulated traffic
    • B. The built-in unit and integration testing framework for Mule 4 applications within Anypoint Studio(correct)
    • C. A policy in API Manager that validates request payloads against a RAML schema
    • D. A CI/CD pipeline orchestration tool for deploying Mule applications

    Explanation: MUnit is MuleSoft's official testing framework, integrated into Anypoint Studio. It allows developers to write unit and integration tests for Mule flows using a visual test editor or XML, with support for mocking connectors and verifying message content, variables, and error handling behavior.

  12. 12. In an MUnit test, a developer wants to prevent the Database Connector from making a real database call and instead return predefined data. Which MUnit feature enables this?

    • A. MUnit Event component
    • B. MUnit Mock When component (mocking the Database connector operation)(correct)
    • C. MUnit Assert That component
    • D. MUnit Spy component

    Explanation: The MUnit 'Mock When' component intercepts a specific processor (identified by its operation type and optional attribute matchers) and replaces its execution with a predefined return value. This lets tests run without real database connections, making tests faster, isolated, and reproducible.

  13. 13. A developer is setting up a CI/CD pipeline to automate Mule application builds and deployments to CloudHub. Which build tool is natively supported for packaging and deploying Mule applications in a CI/CD context?

    • A. Gradle
    • B. Ant
    • C. Maven with the Mule Maven Plugin(correct)
    • D. NPM with the Mule CLI plugin

    Explanation: Mule 4 projects use Maven as the build tool, with the Mule Maven Plugin providing goals for packaging (mule:package), running MUnit tests (mule:test), and deploying to CloudHub, Runtime Fabric, or on-premise runtimes (mule:deploy). Maven + Mule Maven Plugin is the official CI/CD integration path.

  14. 14. Which of the following are valid assertions available in MUnit 2.x? (Select THREE)

    • A. Assert That: payload equalTo 'expected'(correct)
    • B. Assert That: vars.myVar notNullValue()(correct)
    • C. Assert That: error.errorType.identifier is 'HTTP:NOT_FOUND'(correct)
    • D. Assert That: output/application/json is valid JSON schema

    Explanation: MUnit 2.x Assert That supports Hamcrest matchers for payload (equalTo, containsString, etc.), variables (notNullValue, equalTo), and error properties (error.errorType.identifier, error.description). JSON schema validation is not a built-in MUnit assertion — it would require a custom DataWeave check or external validator.

  15. 15. What does the 'watermark' pattern solve in Mule 4 integrations?

    • A. It prevents duplicate processing of records by tracking the last-processed position (e.g., timestamp or ID) across polling intervals(correct)
    • B. It applies a digital watermark to documents for copyright protection
    • C. It limits the number of concurrent threads processing a VM queue
    • D. It persists the Mule message payload to disk in case of application restart

    Explanation: The watermark pattern enables incremental data polling. After each poll, the integration stores the maximum value seen (e.g., the highest updatedAt timestamp or the last processed record ID) as the watermark. On the next poll, only records newer than the watermark are fetched, avoiding reprocessing of previously handled records.

  16. 16. A developer deploys a Mule application to CloudHub using the Maven Mule Plugin in a GitHub Actions pipeline. The deployment fails with 'Unauthorized'. What is the most likely cause?

    • A. The Mule Maven Plugin version is incompatible with the Mule runtime version
    • B. The Anypoint Platform credentials (client ID/secret or username/password) used by the pipeline are missing or incorrect in the Maven settings.xml or pipeline secrets(correct)
    • C. The CloudHub region is not supported by the Mule Maven Plugin
    • D. The application's pom.xml is missing the mule-artifact.json file reference

    Explanation: CloudHub deployments via the Mule Maven Plugin require valid Anypoint Platform credentials. In CI/CD, these are typically stored as pipeline secrets (GitHub Actions secrets, Jenkins credentials) and passed to Maven via -Danypoint.username/-Danypoint.password or Connected App client ID/secret. An 'Unauthorized' error points to missing, expired, or incorrect credentials.

  17. 17. A Mule application needs to process a file containing 500,000 records and write each to a database. Which Mule 4 component is designed for high-volume, asynchronous bulk processing?

    • A. For Each scope
    • B. Scatter-Gather
    • C. Batch Job(correct)
    • D. VM connector with a persistent queue

    Explanation: The Mule 4 Batch Job component is purpose-built for high-volume bulk processing. It divides the input collection into chunks, processes each chunk in a fixed-size thread pool (configurable), supports automatic retries per failed record without failing the entire job, and provides a summary report. For Each is suitable for small collections and runs synchronously.

  18. 18. What is the Outbox Pattern used for in MuleSoft integrations?

    • A. Buffering outbound HTTP responses before sending to the client
    • B. Ensuring reliable, at-least-once event publishing to a message broker even if the broker is temporarily unavailable(correct)
    • C. Routing outbound messages to multiple destinations simultaneously
    • D. Storing API responses in a cache for repeated identical requests

    Explanation: The Outbox Pattern ensures reliable event delivery: instead of publishing directly to a broker (which may fail), the event is first written to a local 'outbox' (database table or persistent queue) within the same transaction as the business operation. A separate process reads the outbox and publishes to the broker, guaranteeing at-least-once delivery even if the broker was temporarily unavailable.

  19. 19. A developer is implementing an idempotent API endpoint. A client may retry the same POST request multiple times due to network timeouts. What approach ensures the operation is only applied once?

    • A. Use a Rate Limiting policy to reject duplicate requests
    • B. Require clients to send an Idempotency-Key header; check if the key was already processed (stored in a cache or database) and return the cached response without re-executing the operation(correct)
    • C. Make the POST endpoint use a GET method instead
    • D. Use Scatter-Gather to attempt the operation in parallel and discard duplicates

    Explanation: Idempotency keys are the standard pattern for safe retries. The client generates a unique key per logical request and sends it as a header (Idempotency-Key). The server stores the key and the result; on retry, it detects the key is already known and returns the stored result without re-executing the business logic. This is the pattern used by payment APIs (Stripe, etc.).

  20. 20. A developer needs a Mule application to pass messages between two separate Mule applications deployed on the same CloudHub infrastructure. Which connector is recommended for this use case?

    • A. HTTP connector (REST calls between apps)
    • B. VM connector with persistent queues
    • C. JMS connector with a message broker(correct)
    • D. Object Store connector

    Explanation: For asynchronous messaging between separate Mule applications (especially if they may be on different workers or run on different timescales), the JMS connector with an external message broker (e.g., Anypoint MQ, ActiveMQ, RabbitMQ) is the recommended approach. VM queues are in-memory/process-local and not shared across separately deployed applications. HTTP is synchronous. Object Store is for state/caching, not message passing.

  21. 21. When designing a high-availability Mule application on CloudHub, which configurations should be enabled? (Select TWO)

    • A. Multiple Workers (horizontal scaling)(correct)
    • B. Persistent Queues (for VM queue durability across worker restarts)(correct)
    • C. Disable CloudHub load balancer to reduce latency
    • D. Set worker size to 0.1 vCore to minimise cost

    Explanation: High availability on CloudHub requires multiple workers (so one worker failing does not cause downtime) and persistent queues (so in-flight VM queue messages survive worker restarts). The CloudHub load balancer distributes traffic across workers — disabling it would negate horizontal scaling. Undersizing workers (0.1 vCore) risks CPU/memory exhaustion under load.

  22. 22. A developer wants to visualise how data flows across multiple Mule applications and their connected systems in the Anypoint Platform. Which tool provides this capability?

    • A. Anypoint Monitoring
    • B. Anypoint Visualizer(correct)
    • C. Anypoint Exchange
    • D. Runtime Manager Alerts

    Explanation: Anypoint Visualizer automatically generates an interactive topology map showing how Mule applications, APIs, and external systems connect and communicate. It gives teams a real-time view of the integration landscape without manual documentation. Anypoint Monitoring provides metrics, logs, and dashboards for individual applications.

  23. 23. A developer needs to trace a specific request through multiple Mule applications to diagnose a latency issue. Which Anypoint Monitoring feature enables this end-to-end tracing?

    • A. Anypoint Monitoring Dashboards
    • B. Anypoint Monitoring Distributed Tracing(correct)
    • C. Runtime Manager Application Logs
    • D. Anypoint Visualizer Topology Map

    Explanation: Anypoint Monitoring's Distributed Tracing propagates a correlation ID through chained API calls across multiple Mule applications, allowing developers to see the full request lifecycle as a trace waterfall — each hop, its duration, and where latency occurs. Application Logs show per-app output but not cross-app correlation.

  24. 24. A Mule application deployed to CloudHub is logging 'WARN Could not connect to external service' intermittently. The application has an error handler that logs and continues. Which Runtime Manager feature should the developer use to set up an automated notification when this warning exceeds a threshold?

    • A. API Manager SLA Tier breach notification
    • B. Anypoint Monitoring Alerts (log alert based on keyword pattern matching)(correct)
    • C. Anypoint Exchange notification subscription
    • D. MUnit test report webhook

    Explanation: Anypoint Monitoring Alerts can be configured to trigger when specific patterns appear in application logs (log-based alerts) or when metrics exceed thresholds (metric-based alerts). Setting a log alert for 'Could not connect' with a frequency threshold will notify the developer via email or Slack when the warning occurs more than N times in a time window.

  25. 25. A Mule application is experiencing high CPU usage on CloudHub. The developer adds detailed DEBUG logging to diagnose the issue. What is the risk of this approach in production?

    • A. DEBUG logging disables the Anypoint Monitoring agent
    • B. DEBUG logging on production can significantly increase CPU and I/O overhead, worsening the performance problem and exposing sensitive data in logs(correct)
    • C. The Mule runtime automatically reverts DEBUG logging to INFO after 60 seconds
    • D. DEBUG logging is not supported on CloudHub — it only works in Anypoint Studio

    Explanation: DEBUG logging is extremely verbose — every message processor, connector call, and DataWeave evaluation generates log output. In production this adds significant CPU overhead (formatting and writing log entries) and I/O pressure, and may expose PII or credentials that pass through the Mule message. Use DEBUG sparingly and revert to INFO/WARN after diagnosis.