














































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The MuleSoft Certified Developer Level 1 Mule 4 exam tests the candidate’s knowledge in building, testing, and deploying APIs and integrations using MuleSoft’s Anypoint Platform. Topics include Mule 4 architecture, Mule flows, connectors, error handling, and best practices in API development and integration.
Typology: Exams
1 / 86
This page cannot be seen from the preview
Don't miss anything!















































































Question 1. Which Anypoint Platform component is primarily used to design, test, and document APIs? A) Runtime Manager B) Anypoint Exchange C) Design Center D) API Manager Answer: C Explanation: Design Center provides API Designer, API Console, and API Notebook for creating and documenting APIs. Question 2. In API‑led connectivity, the System layer is responsible for: A) Exposing data to external consumers B) Orchestrating business processes C) Directly accessing legacy systems and databases D) Managing security policies Answer: C Explanation: The System layer wraps existing systems and exposes them as reusable services. Question 3. A Mule 4 flow is defined in which XML element? A) <sub-flow> B)
Question 4. Which part of a Mule Event contains the data that travels through the flow? A) Variables B) Attributes C) Payload D) Session Answer: C Explanation: The payload holds the actual message content; attributes contain metadata. Question 5. The Logger component is used to: A) Change the payload format B) Persist data to a database C) Write custom messages to the console or log file D) Invoke external APIs Answer: C Explanation: Logger records information for monitoring and debugging. Question 6. To set a flow variable named “orderId” with value 123, which component is appropriate? A) Set Payload B] Set Variable C) Transform Message D) Set Property Answer: B Explanation: Set Variable creates or updates a variable in the Mule Event.
Question 10. When implementing a RAML‑defined GET /orders resource, which Mule component should be placed first in the flow? A) Set Payload B) HTTP Listener C) Transform Message D) Logger Answer: B Explanation: HTTP Listener receives the incoming request and triggers the flow. Question 11. Reusable Data Types in RAML are defined under which section? A) /types B) /traits C) /resourceTypes D) /securitySchemes Answer: A Explanation: The /types folder holds reusable data type definitions. Question 12. To call an external REST service from a Mule flow, you should use: A) HTTP Listener B) HTTP Request C) HTTP Connector (listener) D) HTTP Proxy Answer: B Explanation: HTTP Request initiates outbound calls to external services.
Question 13. Which connector is best suited for reading and writing CSV files? A) File Connector B) Database Connector C) JMS Connector D) SFTP Connector Answer: A Explanation: The File connector handles local and remote file operations, including CSV. Question 14. Connection pooling for a Database connector is configured in: A) Global element of the connector B) Flow variable C) Object Store D) HTTP Listener config Answer: A Explanation: The global configuration element defines pooling parameters. Question 15. To protect an API with username/password, which policy can be applied in API Manager? A) OAuth 2. B) Rate Limiting C) Basic Authentication D) IP Allowlist Answer: C Explanation: Basic Authentication validates a static username and password.
Question 19. Which DataWeave function converts a string to a number? A) toNumber() B) asNumber() C) number() D) parseInt() Answer: A Explanation: toNumber() coerces a string into a numeric type. Question 20. The default operator (??) in DataWeave is used to: A) Provide a fallback value when the left operand is null B) Perform logical AND C) Cast a value to a string D) Filter null elements from an array Answer: A Explanation: ?? returns the right‑hand value if the left‑hand value is null. Question 21. Which DataWeave function would you use to concatenate an array of strings into a single comma‑separated string? A) joinBy(",") B) concat(",") C) merge(",") D) reduce((item, acc) - > acc ++ "," ++ item) Answer: A Explanation: joinBy(separator) concatenates array elements using the given separator.
Question 22. To filter orders with amount > 1000, which DataWeave expression is correct? A) payload filter ((item) - > item.amount > 1000) B) payload.orders filter ((order) - > order.amount > 1000) C) payload.orders map ((order) - > order.amount > 1000) D) payload.orders reduce ((acc, order) - > if (order.amount > 1000) acc ++ [order] else acc) Answer: B Explanation: filter applies a predicate to each element; B selects orders where amount exceeds
Question 23. The groupBy function in DataWeave is used to: A) Sort an array alphabetically B) Split an array into chunks of equal size C) Organize elements into a map keyed by a derived value D) Remove duplicate entries Answer: C Explanation: groupBy creates a map where each key corresponds to a grouping criterion. Question 24. When performing a lookup between two payloads, which DataWeave operator is appropriate? A) ++ B) ~> C) lookup() D) mergeWith() Answer: C Explanation: lookup(source, key) retrieves matching elements from another dataset.
Question 28. In Mule 4, what is the purpose of a Private Flow? A) To expose an HTTP endpoint B) To be invoked only via Flow Reference, not by a listener C) To handle errors globally D) To store configuration properties Answer: B Explanation: Private Flows have no inbound connectors and are called programmatically. Question 29. A Flow Reference component is used to: A] Call an external REST service B] Invoke a sub‑flow or private flow within the same application C] Publish a message to a JMS queue D] Transform the payload using DataWeave Answer: B Explanation: Flow Reference routes the current message to another flow. Question 30. Which error handling component stops the propagation of an error after it is handled? A) On Error Propagate B) On Error Continue C) Try Scope D) Error Throw Answer: B Explanation: On Error Continue marks the error as handled and prevents further propagation.
Question 31. The Mule Error object’s error.errorType field contains: A) The HTTP status code B) The name of the component that failed C) The hierarchical classification of the error (e.g., CONNECTIVITY:TIMEOUT) D) The stack trace Answer: C Explanation: errorType provides a namespace and identifier for the error. Question 32. To create a custom error type named “INVALID_ORDER”, you would use: A) error("INVALID_ORDER") B) raise("INVALID_ORDER") C) throw new MuleException("INVALID_ORDER") D) error("my.custom:INVALID_ORDER") Answer: D Explanation: Custom error types are defined using the namespace:identifier syntax. Question 33. Which connector provides guaranteed delivery when used with a transaction? A) HTTP Connector B) File Connector C) JMS Connector D) SFTP Connector Answer: C Explanation: JMS supports XA and local transactions for reliable messaging.
Explanation: The p() function directly accesses configuration properties. Question 37. Which DataWeave function would you use to convert a UNIX timestamp (milliseconds) to a date string formatted as “yyyy‑MM‑dd”? A) (payload as Date) as String {format: "yyyy-MM-dd"} B) (payload as Date {format: "epoch"}) as String {format: "yyyy-MM-dd"} C) (payload as Number) as Date {format: "epoch"} as String {format: "yyyy-MM-dd"} D) (payload as Number) >> dateTime("yyyy-MM-dd") Answer: C Explanation: Convert the number to a Date using epoch format, then format as a string. Question 38. The DataWeave function sizeOf() returns: A) Number of characters in a string B) Number of elements in an array or entries in an object C) Size of the payload in bytes D) Length of a file on disk Answer: B Explanation: sizeOf() provides the count of items for collections. Question 39. In MUnit, the “mock when” construct is used to: A) Simulate an HTTP request to the flow under test B) Replace a connector call with a predefined response C) Validate the final payload against an expectation D) Deploy the Mule application to a test environment Answer: B
Explanation: “mock when” intercepts a connector call and returns a mock payload. Question 40. Which of the following is a recommended naming convention for Mule flows? A) flow1, flow2, flow B) camelCase describing the purpose, e.g., retrieveCustomerFlow C) ALL_CAPS_WITH_UNDERSCORES D) Random UUID strings Answer: B Explanation: Descriptive camelCase names improve readability and maintenance. Question 41. When debugging a Mule flow in Anypoint Studio, the “Breakpoints” feature allows you to: A) Stop the application deployment B) Pause execution at a specific processor to inspect the Mule Event C) Automatically retry failed messages D) Generate RAML documentation Answer: B Explanation: Breakpoints let you examine payload, attributes, and variables at runtime. Question 42. Which HTTP status code should be returned by a Mule API when a requested resource is not found? A) 200 B) 400 C) 404 D) 500
Explanation: attributes.headers contains incoming HTTP headers. Question 46. Which of the following best describes a “Choice Router”? A) It executes child routes in parallel B) It selects a route based on a DataWeave expression evaluated at runtime C) It iterates over a collection D) It retries a failed connector call Answer: B Explanation: Choice evaluates conditions and routes the message accordingly. Question 47. When using the HTTP Request connector, the “Response Timeout” property defines: A) How long the connector waits for the server to respond before failing B) The maximum size of the response body C) The time the request stays in the queue D) The delay before the request is sent Answer: A Explanation: Response Timeout sets the maximum wait time for a response. Question 48. Which Mule error type is thrown when a JSON payload cannot be parsed? A) TRANSFORMATION:FAILURE B) PARSING:JSON C) VALIDATION:SCHEMA D) CONNECTIVITY:TIMEOUT Answer: B
Explanation: PARSING:JSON indicates a failure during JSON parsing. Question 49. The “Object Store” can be configured as “persistent” or “non‑persistent”. Persistent stores: A) Keep data only during the current flow execution B) Store data in memory only C) Write data to disk so it survives application restarts D) Are cleared on each deployment Answer: C Explanation: Persistent Object Stores survive restarts by persisting to the file system. Question 50. Which DataWeave function converts a Java Map to a JSON object? A) mapToObject() B) write(payload, "application/json") C) object() D) dw::Core::toJson() Answer: B Explanation: write(payload, "application/json") serializes the map as JSON. Question 51. In Mule 4, the default scope for variables created with Set Variable is: A) Flow variable (available only in the current flow) B) Session variable (available across flows in the same session) C) Inbound variable (read‑only) D) Outbound variable (sent to the next flow) Answer: A
Explanation: API Manager handles policies, analytics, and SLA enforcement. Question 55. Which of the following is NOT a built‑in Mule logger level? A) INFO B) DEBUG C) TRACE D) VERBOSE Answer: D Explanation: VERBOSE is not a standard logger level in Mule. Question 56. In a Mule flow, the “Set Payload” component is typically placed: A) At the very beginning, before any processing B) After a transformation to define the outgoing message content C) Inside a Choice router only D) Only inside a sub‑flow Answer: B Explanation: Set Payload defines or overrides the message body before it leaves the flow. Question 57. The “DataWeave 2.0” header must be the first line of a script. Which of the following is the correct header? A) %dw 1. B) %dw 2. C) %dw version=2. D) %dw:2. Answer: B
Explanation: %dw 2.0 indicates DataWeave version 2. Question 58. Which DataWeave expression returns the current date and time in ISO‑ 8601 format? A) now() B) currentDateTime() C) dateTimeNow() D) timestamp() Answer: A Explanation: now() yields a DateTime value formatted as ISO‑8601 by default. Question 59. To filter out null values from an array, which expression is correct? A) payload filter ($ != null) B) payload map ($ != null) C) payload reduce ((acc, item) - > if (item != null) acc ++ [item] else acc) D) payload distinctBy($) Answer: A Explanation: filter keeps elements that satisfy the predicate; A removes nulls. Question 60. Which Mule component can be used to publish a message to a JMS queue without waiting for a response? A) JMS Listener B) JMS Publish C) JMS Request D) JMS Consumer