|
40 | 40 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
41 | 41 | import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
42 | 42 | import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
| 43 | +import static org.assertj.core.api.Assertions.assertThatNullPointerException; |
43 | 44 |
|
44 | 45 | /**
|
45 | 46 | * @author Rob Winch
|
@@ -182,16 +183,14 @@ private void assertIssuerMetadata(ClientRegistration registration, ClientRegistr
|
182 | 183 | @Test
|
183 | 184 | public void issuerWhenResponseMissingJwksUriThenThrowsIllegalArgumentException() throws Exception {
|
184 | 185 | this.response.remove("jwks_uri");
|
185 |
| - assertThatIllegalArgumentException().isThrownBy(() -> registration("").build()) |
186 |
| - .withMessageContaining("The public JWK set URI must not be null"); |
| 186 | + assertThatIllegalArgumentException().isThrownBy(() -> registration("").build()); |
187 | 187 | }
|
188 | 188 |
|
189 | 189 | // gh-7512
|
190 | 190 | @Test
|
191 | 191 | public void issuerWhenOidcFallbackResponseMissingJwksUriThenThrowsIllegalArgumentException() throws Exception {
|
192 | 192 | this.response.remove("jwks_uri");
|
193 |
| - assertThatIllegalArgumentException().isThrownBy(() -> registrationOidcFallback("issuer1", null).build()) |
194 |
| - .withMessageContaining("The public JWK set URI must not be null"); |
| 193 | + assertThatIllegalArgumentException().isThrownBy(() -> registrationOidcFallback("issuer1", null).build()); |
195 | 194 | }
|
196 | 195 |
|
197 | 196 | // gh-7512
|
@@ -476,8 +475,7 @@ private ClientRegistration.Builder registration(Map<String, Object> configuratio
|
476 | 475 | @Test
|
477 | 476 | public void issuerWhenOidcConfigurationResponseMissingJwksUriThenThrowsIllegalArgumentException() throws Exception {
|
478 | 477 | this.response.remove("jwks_uri");
|
479 |
| - assertThatIllegalArgumentException().isThrownBy(() -> registration(this.response).build()) |
480 |
| - .withMessageContaining("The public JWK set URI must not be null"); |
| 478 | + assertThatNullPointerException().isThrownBy(() -> registration(this.response).build()); |
481 | 479 | }
|
482 | 480 |
|
483 | 481 | @Test
|
|
0 commit comments