Refactoring beat unit tests and regression tests for #48