slight refactoring of the junit reporter