Should you assert not null with the assert statement in production code? [closed]

I’ve seen this question but have a few more questions about the usage of the assert keyword. I was debating with a few other coders about using assert. For this use case, there was a method that can …

Is it possible to access instance of exception “catched” with JUnit Rule ExpectedException?

Suppose that in a test is: @Rule public ExpectedException thrown = ExpectedException.none(); and some test contains: thrown.expect(SomeNastyException.class); Now if there is a need to inspect this …