General refactoring of Beaker tests