2323import org .apache .camel .attachment .AttachmentMessage ;
2424import org .apache .camel .component .spring .ws .SpringWebserviceConstants ;
2525import org .apache .camel .test .junit6 .ExchangeTestSupport ;
26- import static org .assertj .core .api .Assertions .assertThat ;
27-
26+ import org .assertj .core .api .Assertions ;
2827import org .assertj .core .util .Streams ;
2928import org .junit .jupiter .api .BeforeEach ;
3029import org .junit .jupiter .api .Test ;
@@ -81,10 +80,10 @@ public void withoutHeader() throws Exception {
8180 filter .filterProducer (exchange , message );
8281 filter .filterConsumer (exchange , message );
8382
84- assertThat (message .getAttachments ()).isExhausted ();
85- assertThat (message .getSoapHeader ().examineAllHeaderElements ()).isExhausted ();
83+ Assertions . assertThat (message .getAttachments ()).isExhausted ();
84+ Assertions . assertThat (message .getSoapHeader ().examineAllHeaderElements ()).isExhausted ();
8685
87- assertThat (message .getSoapHeader ().getAllAttributes ()).isExhausted ();
86+ Assertions . assertThat (message .getSoapHeader ().getAllAttributes ()).isExhausted ();
8887 }
8988
9089 @ Test
@@ -103,10 +102,10 @@ public void removeCamelInternalHeaderAttributes() throws Exception {
103102
104103 filter .filterConsumer (exchange , message );
105104
106- assertThat (message .getAttachments ()).isExhausted ();
107- assertThat (message .getSoapHeader ().examineAllHeaderElements ()).isExhausted ();
105+ Assertions . assertThat (message .getAttachments ()).isExhausted ();
106+ Assertions . assertThat (message .getSoapHeader ().examineAllHeaderElements ()).isExhausted ();
108107
109- assertThat (message .getSoapHeader ().getAllAttributes ()).isExhausted ();
108+ Assertions . assertThat (message .getSoapHeader ().getAllAttributes ()).isExhausted ();
110109 }
111110
112111 @ Test
@@ -115,12 +114,12 @@ public void consumerWithHeader() throws Exception {
115114 exchange .getOut ().getHeaders ().put ("headerAttributeElement" , new QName ("http://shouldBeInHeader" , "myElement" ));
116115 filter .filterConsumer (exchange , message );
117116
118- assertThat (message .getAttachments ()).isExhausted ();
117+ Assertions . assertThat (message .getAttachments ()).isExhausted ();
119118
120- assertThat (Streams .stream (message .getSoapHeader ().examineAllHeaderElements ()).toList ()).isNotEmpty ()
119+ Assertions . assertThat (Streams .stream (message .getSoapHeader ().examineAllHeaderElements ()).toList ()).isNotEmpty ()
121120 .hasSize (1 );
122121
123- assertThat (Streams .stream (message .getSoapHeader ().getAllAttributes ()).toList ()).isNotEmpty ().hasSize (1 );
122+ Assertions . assertThat (Streams .stream (message .getSoapHeader ().getAllAttributes ()).toList ()).isNotEmpty ().hasSize (1 );
124123
125124 }
126125
@@ -132,12 +131,12 @@ public void producerWithHeader() throws Exception {
132131
133132 filter .filterProducer (exchange , message );
134133
135- assertThat (message .getAttachments ()).isExhausted ();
134+ Assertions . assertThat (message .getAttachments ()).isExhausted ();
136135
137- assertThat (Streams .stream (message .getSoapHeader ().examineAllHeaderElements ()).toList ()).isNotEmpty ()
136+ Assertions . assertThat (Streams .stream (message .getSoapHeader ().examineAllHeaderElements ()).toList ()).isNotEmpty ()
138137 .hasSize (1 );
139138
140- assertThat (Streams .stream (message .getSoapHeader ().getAllAttributes ()).toList ()).isNotEmpty ().hasSize (2 );
139+ Assertions . assertThat (Streams .stream (message .getSoapHeader ().getAllAttributes ()).toList ()).isNotEmpty ().hasSize (2 );
141140
142141 }
143142
@@ -146,7 +145,7 @@ public void withoutAttachment() throws Exception {
146145 filter .filterConsumer (exchange , message );
147146 filter .filterProducer (exchange , message );
148147
149- assertThat (message .getAttachments ()).isExhausted ();
148+ Assertions . assertThat (message .getAttachments ()).isExhausted ();
150149 }
151150
152151 @ Test
@@ -156,8 +155,8 @@ public void producerWithAttachment() throws Exception {
156155
157156 filter .filterProducer (exchange , message );
158157
159- assertThat (Streams .stream (message .getAttachments ()).toList ()).isNotEmpty ();
160- assertThat (message .getAttachment ("testAttachment" )).isNotNull ();
158+ Assertions . assertThat (Streams .stream (message .getAttachments ()).toList ()).isNotEmpty ();
159+ Assertions . assertThat (message .getAttachment ("testAttachment" )).isNotNull ();
161160 }
162161
163162 @ Test
@@ -167,7 +166,7 @@ public void consumerWithAttachment() throws Exception {
167166
168167 filter .filterConsumer (exchange , message );
169168
170- assertThat (Streams .stream (message .getAttachments ()).toList ()).isNotEmpty ();
171- assertThat (message .getAttachment ("testAttachment" )).isNotNull ();
169+ Assertions . assertThat (Streams .stream (message .getAttachments ()).toList ()).isNotEmpty ();
170+ Assertions . assertThat (message .getAttachment ("testAttachment" )).isNotNull ();
172171 }
173172}
0 commit comments