### Question:
OAuthConfigurationService { public void updateOAuthConfiguration(AuthenticationProperties authenticationProperties) { Collection<OAuthConfiguration> oAuthConfigurations = getOAuthConfigurations(); OAuthConfiguration clientId = getConfigurationByName(oAuthConfigurations, OAuthConfigurationName.CLIENT_ID); OAuthConfiguration clientSecret = getConfigurationByName(oAuthConfigurations, OAuthConfigurationName.CLIENT_SECRET); OAuthConfiguration scope = getConfigurationByName(oAuthConfigurations, OAuthConfigurationName.SCOPE); clientId.setValue(authenticationProperties.getClientId()); clientSecret.setValue(authenticationProperties.getClientSecret()); scope.setValue(authenticationProperties.getScope()); oAuthConfigurationRepository.save(clientId); oAuthConfigurationRepository.save(clientSecret); oAuthConfigurationRepository.save(scope); logger.info("Updated OAuth Configuration"); }  Collection<OAuthConfiguration> getOAuthConfigurations(); OAuthConfiguration getOAuthConfigurationByName(OAuthConfigurationName name); void updateOAuthConfiguration(AuthenticationProperties authenticationProperties); void setOAuthConfiguration(OAuthConfigurationName name, String value);  }### Answer:
@Test public void updateOauthFrontendDetails_updates_details() { when(oAuthConfigurationRepository.findAll()).thenReturn(Collections.emptyList()); OAuthClientDetails oAuthClientDetails = new OAuthClientDetails(); oAuthClientDetails.setClientId("test123"); oAuthClientDetails.setClientSecret("test456"); oAuthClientDetails.setWebServerRedirectUri("www.example.com"); oAuthConfigurationService.updateOAuthConfiguration(oAuthClientDetails); verify(oAuthConfigurationRepository, times(3)).save(any()); }