System.setIn(bais);
GrepAction grep = new GrepAction();
DefaultActionPreparator preparator = new DefaultActionPreparator();
preparator.prepare(grep, null, Arrays.<Object>asList("-C", "100", "2"));
grep.doExecute();
} finally {
System.setIn(input);
}
}
}