Refactored the code in BoardTest and GameLogicTest