Chapter 4. Using predicates to send different responses

This chapter covers

  • Using predicates to send different responses for different requests
  • Simplifying predicates on JSON request bodies
  • Using XPath to simplify predicates on XML request bodies

During his younger years, Frank William Abagnale Jr. forged a pilot’s license and traveled the world by deadheading.[1] Despite not being able to fly, his successful impersonation of a pilot meant that his food and lodging were fully paid for by the airline. When that well dried up, he impersonated a physician in New Orleans for nearly a year without any medical background, supervising resident interns. When he didn’t know how to respond after a nurse said a baby had “gone blue,” he realized the ...

Get Testing Microservices with Mountebank now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.