### Question:
GameActivity extends RoboFragmentActivity implements LoaderManager.LoaderCallbacks<Cursor> { protected void refreshUI(boolean gameOverNoWinner, GameWinPattern gameWinPattern, GameSymbol winningSymbol, int[] selectedXBoxIds, int[] selectedOBoxIds) { if(gameWinPattern != null){ hapticFeedbackHelper.vibrate(hapticFeedbackHelper.getWinningPattern(toeGame.symbolIsAndroid(winningSymbol)), HapticFeedbackHelper.VIBE_PATTERN_NO_REPEAT); disableAllBoxes(); highlightWinningPattern(gameWinPattern); getMessageTurnIndicator.setText(getString(R.string.game_message_over)); messageTurnIndicatorValue.setText(getString(R.string.game_message_wins, winningSymbol.getValue())); } else if(gameOverNoWinner){ getMessageTurnIndicator.setText(getString(R.string.game_message_over)); messageTurnIndicatorValue.setText(getString(R.string.game_message_draw)); } else{ getMessageTurnIndicator.setText(getString(R.string.message_turn_indicator)); messageTurnIndicatorValue.setText(toeGame.getTurn().getValue()); startTurn(selectedXBoxIds, selectedOBoxIds); } }  void chooseBox(View view); void newGame(View view); @Override Loader<Cursor> onCreateLoader(int id, Bundle args); @Override void onLoadFinished(Loader<Cursor> loader, Cursor data); @Override void onLoaderReset(Loader<Cursor> loader);  }### Answer:
@Test public void shouldDisplayDrawIfNoOneWins(){ int[] XIds = new int[]{1,2,4,5,9}; int[] OIds = new int[]{3,6,7,8}; activity.refreshUI(true, null, GameSymbol.O, XIds, OIds); Assert.assertEquals("DRAW!", activity.messageTurnIndicatorValue.getText()); }
@Test public void shouldDisplayCurrentTurnWhileGameInProgress(){ int[] XIds = new int[]{1,2}; int[] OIds = new int[]{3,6}; activity.refreshUI(false, null, GameSymbol.O, XIds, OIds); Assert.assertEquals(GameSymbol.X.getValue(), activity.messageTurnIndicatorValue.getText()); when(toeGame.getTurn()).thenReturn(GameSymbol.O); activity = Robolectric.buildActivity(GameActivity.class).create().start().resume().get(); activity.refreshUI(false, null, GameSymbol.O, XIds, OIds); Assert.assertEquals(GameSymbol.O.getValue(), activity.messageTurnIndicatorValue.getText()); }