Improve tests
- tests could be run without side effect to other tests (no modification
of System.out and System.err)
- mock the formatter
- add error messages