mardi 11 février 2020

Callback response at JUnit test

I'm writing tests of remote api right now, and i've met a problem methods that assume callback receiving... For example, i'm making RestTemplate's post queries using exchange method and after i get a response a remote process is started and when finished i need to receive callback. I need to catch it somehow during the test, but the current project is a legacy spring project without spring boot. So i can't use spring magic. What is the concept? Do i need to initialize a DispatcherServlet before test run?

Aucun commentaire:

Enregistrer un commentaire