refactor balance test in different methods and classes