Articles

In our day-to-day work, we develop applications that include interactions with software components through I/O. They can be a database, a broker, or some form of blob storage. Take, for example, the cloud components you interact with: Azure Storage Queue, SQS, Pub/Sub. The communication with those components usually happens with an SDK.

From the start, testing will kick in. Therefore, the interaction with those components should be tackled in a testing context. An approach is to use installations (or simulators) of those components and have the code interacting with an actual instance, just like the way it can be achieved by using test containers or by creating infrastructure for testing purposes only.
Another approach is to spin up a mock service of the components and have the tests interacting with it. A good example of this can be Hoverfly. A simulated HTTP service is run during testing and test cases interact with it. 

Source de l’article sur DZONE

In this article, we will set up an HTTP connector and will work with the listener configurations to build a simple HTTP service to return a static message as the response. The Anypoint studio version used will be version 7.6 and the mule run time version will be 4.3 for this demonstration and better to use the same version of Anypoint studio and mule run time if in case you are planning to try out to build the project.

Setting up a simple HTTP service:

Source de l’article sur DZONE