I have a program that uses JAMA and need to test is a matrix can be inverted. I know that I can just try it and catch an exception but that seems like a bad idea (having a catch block as part of the "normal" code path seems to be bad form).
A test that also returns the inverse (or run in a better O() than the inverse operation) would be preferred.