Switch to non-deprecated JUnit methods.