@Test public void testGetCurrentLocale() { final Locale locale = new Locale("de"); when(localizationService.getCurrentLocale()).thenReturn(locale); final Locale currentLocale = i18NService.getCurrentLocale(); assertEquals( "Wrong current locale isocode! Should be: '" + locale.getLanguage() + "' but was: '" + currentLocale.getLanguage() + "'.", locale.getLanguage(), currentLocale.getLanguage()); verify(localizationService, times(1)).getCurrentLocale(); }