major problem there is that returning the original streams (out or err) may not happen in case of exception thrown from the below code. This is very dangerous because output of further tests may be destroyed.