In the spring documentation regarding testing, it states:
Avoid false positives when testing ORM code
When you test code involving an
Spring documentation uses the wrong concept. It has been clear
but the same code throws an exception in a live, production environment
Here goes wikipedia
Type II error, also known as an "error of the second kind", a β error, or a "false negative": the error of failing to reject a null hypothesis when it is in fact not true. An example of this would be if a test shows that a woman is not pregnant, when in reality, she is.
If you see the sample provided by Spring, The production environment throws an exception (A GenericJDBCException), but it has not been detected. In order to see, you must call the underlying commit when using some ORM provider.
XUnit Test patterns definition
A situantion in which a test passes even though the system under test is not working properly.
So the right concept is falseNegative
@Test // no expected exception!
public void falseNegative() {