Objectives

This time we want to reuse specific message exchange logic by using test behaviors in our tests. The test behavior is a
class that provides a set of test actions for reuse in other test cases. A typical test behavior looks like this:

The behavior extends AbstractTestBehavior and defines its logic in the apply method where you can use all Citrus Java fluent API methods as you would do in a normal test.
The behavior is then applied in your test as follows:

The sample above applies the behavior in the test multiple times with different names. The result will be multiple echo test actions that print out the messages to the console logging.
Now we can use behaviors in order to add new todo entries via Http POST request.