Junit5, Mockito for catch block for tidyJsonItemWriter.dump | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Nikhil-Kumar

@anilc27140375 
Please have a look into below link, it's not exact the same thing. But it might help.
https://www.codejava.net/testing/junit-test-exception-examples-how-to-assert-an-exception-is-thrown

Thanks,
Nikhil

2 replies

Nikhil-Kumar
Community Advisor
Nikhil-KumarCommunity AdvisorAccepted solution
Community Advisor
August 24, 2020

@anilc27140375 
Please have a look into below link, it's not exact the same thing. But it might help.
https://www.codejava.net/testing/junit-test-exception-examples-how-to-assert-an-exception-is-thrown

Thanks,
Nikhil

Vijayalakshmi_S
Level 10
August 25, 2020

Hi @anilc27140375,

Can you let know if you are printing log message or any logic is handled in catch block for JSONException, RepositoryException and/or ValueFormatException part of dump method