Skip to content

Commit 40da617

Browse files
committed
sonar
1 parent 3199a06 commit 40da617

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

server/src/test/java/org/cloudfoundry/identity/uaa/provider/oauth/ExternalOAuthAuthenticationManagerIT.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
import java.util.Map;
8888
import java.util.UUID;
8989
import java.util.concurrent.CountDownLatch;
90-
import java.util.stream.Collectors;
9190
import java.util.stream.Stream;
9291

9392
import static java.util.Collections.emptyList;
@@ -579,7 +578,7 @@ void discoveryURL_is_used() throws MalformedURLException {
579578
mockToken();
580579
addTheUserOnAuth();
581580
externalOAuthAuthenticationManager.authenticate(xCodeToken);
582-
verify(externalOAuthProviderConfigurator, atLeast(1)).overlay(eq(config));
581+
verify(externalOAuthProviderConfigurator, atLeast(1)).overlay(config);
583582
mockUaaServer.verify();
584583

585584
}
@@ -798,7 +797,7 @@ void null_key_config_invalid() throws Exception {
798797
externalOAuthAuthenticationManager.authenticate(xCodeToken);
799798
fail("not expected");
800799
} catch (Exception e) {
801-
assertThat(e instanceof IllegalArgumentException).isTrue();
800+
assertThat(e).isInstanceOf(IllegalArgumentException.class);
802801
}
803802
}
804803

@@ -874,7 +873,7 @@ void updateShadowUser_IfAlreadyExists() {
874873

875874
ArgumentCaptor<ApplicationEvent> userArgumentCaptor = ArgumentCaptor.forClass(ApplicationEvent.class);
876875
verify(publisher, times(2)).publishEvent(userArgumentCaptor.capture());
877-
assertThat(userArgumentCaptor.getAllValues().size()).isEqualTo(2);
876+
assertThat(userArgumentCaptor.getAllValues()).hasSize(2);
878877
ExternalGroupAuthorizationEvent event = (ExternalGroupAuthorizationEvent) userArgumentCaptor.getAllValues().get(0);
879878

880879
UaaUser uaaUser = event.getUser();

0 commit comments

Comments
 (0)