Book Image

Spring Integration Essentials

By : CHANDAN K PANDEY
Book Image

Spring Integration Essentials

By: CHANDAN K PANDEY

Overview of this book

Table of Contents (18 chapters)
Spring Integration Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Testing Support

Test Driven Development (TDD) has revolutionized the way software is developed and deployed, and why not, every customer wants working software—and the best way to prove that it's working is to test it! Spring Integration is no exception—so how can we test that each of the "units" are working in isolation?—in fact it's even more important to test the units so that any integration issues can be easily isolated. For example, an FTP inbound gateway is dependent on external factors such as user roles on the FTP server, performance of the FTP server, network latency, and so on. How can we validate that the consumer connected to an FTP inbound gateway can process files without actually connecting to an FTP server? We can send "mock" messages to the channel, which will be treated by the consumer as though it arrived from an FTP server! All we want to prove is that, given that files arrive on the channel, the listener will do its job.

In this chapter, I will cover aspects...