Tag Archives: unit-testing

MQTT Broker-Client

By | February 20, 2022

Reading Time: 16 minutes In this article I will, using a test-case, show how to publish and consume MQTT messages using the reactive HiveMQ client library. I will use the Mosquitto MQTT broker for the test. The example application will be implemented using Spring Boot 3 and Java 17. The example will initially allow unauthenticated access that later will… Read More »

Mocking HTTP Services with WireMock – Part 2

By | March 3, 2018

Reading Time: 11 minutes In this second article on HTTP testing with WireMock and REST Assured I will show how to set up a HTTPS mock service, with and without mutual authentication, using WireMock and then use REST Assured as a HTTP client to send requests to the service. I highly recommend reading the first article if you haven’t… Read More »

Embedded ActiveMQ with SSL

By | August 15, 2016

Reading Time: 6 minutes In this post I will show how to run an embedded instance of ActiveMQ that uses SSL for communication. In the process I will also show how to configure a JMS client to use SSL. The resulting project is available on GitHub. I have omitted the keystore and truststore in this article – if you… Read More »

Spring Dependency Injection in Mule FunctionalTestCase

By | December 13, 2015

Reading Time: 3 minutes In this article I will show how to accomplish dependency injection of fields in tests that inherit from the Mule class FunctionalTestCase; both of dependencies to Spring beans and of values from property files. Background On an earlier occasion, I have attempted to use the standard @RunWith(SpringJUnit4ClassRunner.class) annotation in order to be able to have Spring… Read More »

Embedded ActiveMQ Broker with Mule

By | June 26, 2014

Reading Time: 4 minutes In this post I will show how an embedded ActiveMQ broker is automatically started when using the broker URL “vm://localhost” in a Mule JMS connector, without any additional configuration, and how to disable this behaviour. I will also look at how to explicitly configure an embedded ActiveMQ broker in a Mule configuration file. As documented… Read More »

Mule Unit Tests with Inbound Message Properties in Session or Invocation Scope

By | February 28, 2014

Reading Time: 6 minutes My very first blog post described how to unit test Mule transformers that access session and/or invocation scoped message properties. To accomplish that I developed a new, better, Mule message. In this post I will describe how this new Mule message class can be extended to allow for session and/or invocation scoped message properties to… Read More »