Summary
Functional programming is an old concept that is gaining popularity, because it's easier to use when trying to increase performance by executing tasks in parallel. In this chapter some concepts from the functional world were presented along with some of the test tools that AssertJ provides.
Testing functions without side effects is very easy because the test scope is reduced. Instead of testing changes that the function might cause on different objects, the only thing that needs to be verified is the outcome of the invocation. No side-effects means that the outcome of the function is the same as long as the parameters are the same. Therefore, the execution is repeatable as many times as needed and leads to the same result on every execution. Additionally, tests are easier to read and comprehend.
To conclude, Java includes a good API for functional programming if you need to use this paradigm within your projects. But there are some languages, some of them purely functional, that offer...