### Question:
ChronoFragment extends RoboFragment implements ChronoInterface { @Override public void onResume() { super.onResume(); int timeSlotLength = getSharedPreferences().getInt(TIME_SLOT_LENGTH, -1); if (timeSlotLength == -1) { timeSlotLength = SlotSeekBarController.DEFAULT_VALUE; } mScrumTimer.setTimeSlotLength(timeSlotLength); mSeekBar.setVisibility(View.VISIBLE); mParticipantTextView.setVisibility(View.GONE); mSeekBar.setProgress(timeSlotLength); setTime(timeSlotLength); }  @Override View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState); @Override void onStart(); @Override void onResume(); int getNumberOfParticipants(); @Override void setTime(int time); void pauseTickSound(); @Override void setDailyTimer(final String string); @Override void timeOut(); @Override void setCountDown(final String string); void resetBackground(); @Override void onStop(); int getNumberOfTimeouts(); String getPreparationTime(); static final String TOTAL_TIME; static final String TIMEOUTS; static final String WARMUP_TIME; static final String PREFS_NAME; static final String TIME_SLOT_LENGTH; }### Answer:
@Test public void whenTimeSlotLengthNotSetThenDefaultValue() { when(mockPreferences.getInt(ChronoFragment.TIME_SLOT_LENGTH, -1)).thenReturn(-1); when(mockTimer.getPrettyTime(60)).thenReturn("01:00"); out.onResume(); assertEquals(SlotSeekBarController.DEFAULT_VALUE, mSeekBar.getProgress()); assertEquals("01:00", mCountDownTextView.getText()); }