Might be a strange question but indeed I would like to achieve a a bit more coverage on my tests and although I coded against a JsonProcessingException I can\'t
just in case this may help someone, when i was unit testing for a JsonProcessingException i kept getting this error:
JsonProcessingException has protected access in com.fasterxml.jackson...
this was my code
// error is on the below line
JsonProcessingException e = new JsonProcessingException("borked");
doThrow(e).when(classMock).methodToMock(any(), any());
i found out i just needed to add "{}" as such
JsonProcessingException e = new JsonProcessingException("borked") {};