@Test public void testSetTranslations() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); translationController.setLocale(Locale.ENGLISH, request, response, () -> "admin"); verify(credentialRepository, atLeastOnce()).findByEmail("admin"); verify(localeResolver, atLeastOnce()).setLocale(request, response, Locale.ENGLISH); }