Ah, it looks like the error message is okay when no exception is thrown:
Method test.tmp.A.f() should have thrown an exception of class java.lang.NumberFormatException
But when the wrong exception is thrown, it's not very verbose:
FAILED: f
java.lang.RuntimeException
at test.tmp.A.f(A.java:37)
I agree that for the second case, the message should be "Expected NumberFormatException, but got RuntimeException".
Is this what you're asking?