|
6 | 6 | */
|
7 | 7 | package org.mule.test.http.functional.requester.crl;
|
8 | 8 |
|
9 |
| -import static org.mule.runtime.core.privileged.security.tls.TlsConfiguration.formatInvalidCrlAlgorithm; |
10 | 9 |
|
11 | 10 | import static java.util.Arrays.asList;
|
12 | 11 | import static java.util.Collections.emptySet;
|
|
16 | 15 | import static org.hamcrest.CoreMatchers.instanceOf;
|
17 | 16 | import static org.hamcrest.core.Is.is;
|
18 | 17 | import static org.junit.Assert.assertThat;
|
19 |
| -import static org.junit.Assert.fail; |
20 | 18 |
|
21 | 19 | import org.mule.extension.http.internal.temporary.HttpConnector;
|
22 | 20 | import org.mule.extension.socket.api.SocketsExtension;
|
23 | 21 | import org.mule.functional.junit4.AbstractConfigurationFailuresTestCase;
|
24 |
| -import org.mule.runtime.api.exception.MuleException; |
25 | 22 | import org.mule.runtime.api.lifecycle.CreateException;
|
26 | 23 | import org.mule.runtime.api.meta.model.ExtensionModel;
|
27 | 24 | import org.mule.runtime.core.api.extension.provider.MuleExtensionModelProvider;
|
|
30 | 27 |
|
31 | 28 | import org.junit.Test;
|
32 | 29 |
|
33 |
| - |
34 | 30 | public class HttpInvalidCrlAlgorithmTestCase extends AbstractConfigurationFailuresTestCase {
|
35 | 31 |
|
| 32 | + public static final String INVALID_CRL_ALGORITHM_SunX509 = |
| 33 | + "TLS Context: certificate revocation checking is only available for algorithm PKIX (current value is SunX509)"; |
| 34 | + |
36 | 35 | @Test
|
37 | 36 | public void testInvalidCrlAlgorithm() {
|
38 | 37 | try {
|
39 | 38 | loadConfiguration("http-requester-tls-crl-invalid-algorithm-config.xml");
|
40 | 39 | } catch (Exception e) {
|
41 | 40 | Throwable rootCause = getRootCause(e);
|
42 | 41 | assertThat(rootCause, instanceOf(CreateException.class));
|
43 |
| - assertThat(rootCause.getMessage(), is(formatInvalidCrlAlgorithm("SunX509"))); |
| 42 | + assertThat(rootCause.getMessage(), is(INVALID_CRL_ALGORITHM_SunX509)); |
44 | 43 | }
|
45 | 44 | }
|
46 | 45 |
|
|
0 commit comments