Home > Blockchain >  How to mock a JSON document for test using spring boot and mockito
How to mock a JSON document for test using spring boot and mockito

Time:06-21

In spring boot test, How to test a method that consumes a JSON Document (list of json object) parses it, does a processing on the data and return a list of objects.

CodePudding user response:

You can keep the Json object in your src/test/resources directory and than you can read it inside your test case and pass it as an input to your test case

  • Related