Awesome, this was exactly what I was hoping for.

Could you wrap this in a try/finally though, such that you save the original system in handle, and reset system in back to that afterwards, just to ensure the test doesn't break other things that depend on system in later on?

Eg. oldIn = System.in;
System.setIn(blah)
try
{
 /// test
} finally
{
  system.setIn(oldIn);
}

Past that, I'd be happy to merge this :)