@Test public void resolveExceptionShouldSetCountries() { long maxUploadSize = 1000; setUpPlayerProfile(); final ModelAndView modelAndViewUnderTest = underTest.resolveException( request, response, null, new MaxUploadSizeExceededException(maxUploadSize)); assertSame( countryRepository.getCountries(), modelAndViewUnderTest.getModelMap().get("countries")); }
@Before public void setUp() { MockitoAnnotations.initMocks(this); when(yazinoConfiguration.getBoolean(anyString())).thenReturn(true); when(countryRepository.getCountries()).thenReturn(expectedCountries); modelMap = new ModelMap(); request = new MockHttpServletRequest(); response = new MockHttpServletResponse(); underTest = new PlayerProfileController( lobbySessionCache, playerProfileService, avatarRepository, lobbyExceptionHandler, passwordChangeFormValidator, playerProfileCacheRemovalListener, yazinoConfiguration, genderRepository, countryRepository, playerService); }