### Question:
SudokuMovementController { void initializeButtonStyle(SudokuCell cell, Button btn, int num) { if (!cell.isToBeFilled()) { gameActivity.setButtonNum(btn, num); gameActivity.setButtonFixedBackground(btn); } else { gameActivity.setButtonToBeFilledBackground(btn); if (num != 0) { gameActivity.setButtonNum(btn, num); } } } SudokuMovementController(SudokuBoardManager boardManager, SudokuGameActivity gameActivity);   }### Answer:
@Test public void testInitializeButtonStyleFixed() { SudokuGameActivity gameActivity = mock(SudokuGameActivity.class); SudokuBoardManager boardManager = mock(SudokuBoardManager.class); Button btn = mock(Button.class); SudokuCell cell = new SudokuCell(); int num = 1; SudokuMovementController mController = new SudokuMovementController(boardManager, gameActivity); mController.initializeButtonStyle(cell, btn, num); verify(gameActivity).setButtonNum(btn, num); verify(gameActivity).setButtonFixedBackground(btn); }
@Test public void testInitializeButtonStyleToBeFilled() { SudokuGameActivity gameActivity = mock(SudokuGameActivity.class); SudokuBoardManager boardManager = mock(SudokuBoardManager.class); Button btn = mock(Button.class); SudokuCell cell = new SudokuCell(); cell.setToBeFilled(); int num = 1; SudokuMovementController mController = new SudokuMovementController(boardManager, gameActivity); mController.initializeButtonStyle(cell, btn, num); verify(gameActivity).setButtonNum(btn, num); verify(gameActivity).setButtonToBeFilledBackground(btn); }