25
25
import static org .mockito .BDDMockito .willAnswer ;
26
26
import static org .mockito .Mockito .inOrder ;
27
27
import static org .mockito .Mockito .mock ;
28
- import static org .mockito .Mockito .withSettings ;
29
28
30
29
import java .time .Duration ;
31
30
import java .util .ArrayList ;
@@ -219,7 +218,7 @@ public Consumer consumer() {
219
218
@ SuppressWarnings ({ "rawtypes" , "unchecked" })
220
219
@ Bean
221
220
Producer producer () {
222
- Producer producer = mock (Producer .class , withSettings (). verboseLogging () );
221
+ Producer producer = mock (Producer .class );
223
222
willAnswer (inv -> {
224
223
this .commitLatch .countDown ();
225
224
return null ;
@@ -230,16 +229,16 @@ Producer producer() {
230
229
@ SuppressWarnings ("rawtypes" )
231
230
@ Bean
232
231
ProducerFactory pf () {
233
- ProducerFactory pf = mock (ProducerFactory .class , withSettings (). verboseLogging () );
232
+ ProducerFactory pf = mock (ProducerFactory .class );
234
233
given (pf .createProducer (isNull ())).willReturn (producer ());
235
234
given (pf .transactionCapable ()).willReturn (true );
236
235
return pf ;
237
236
}
238
237
239
- @ SuppressWarnings ("rawtypes" )
238
+ @ SuppressWarnings ({ "rawtypes" , "unchecked" } )
240
239
@ Bean
241
240
KafkaTransactionManager tm () {
242
- return new KafkaTransactionManager <> (pf ());
241
+ return new KafkaTransactionManager (pf ());
243
242
}
244
243
245
244
@ SuppressWarnings ({ "rawtypes" , "unchecked" })
0 commit comments