From the course: JSON Processing with Java EE

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Write unit test

Solution: Write unit test

From the course: JSON Processing with Java EE

Start my 1-month free trial

Solution: Write unit test

- [Instructor] Your challenge was to write a unit test that verifies that the JSON object constructed in the buildJsonDocument method was actually constructed correctly. And here's how I solved it. It should look very familiar to you, and that is because it is a direct copy of the test we wrote earlier to validate that the JSON document was read into memory correctly.

Contents