3737import com .github .sonus21 .rqueue .core .RqueueBeanProvider ;
3838import com .github .sonus21 .rqueue .core .RqueueMessage ;
3939import com .github .sonus21 .rqueue .core .RqueueMessageTemplate ;
40- import com .github .sonus21 .rqueue .models .Concurrency ;
4140import com .github .sonus21 .rqueue .dao .RqueueSystemConfigDao ;
41+ import com .github .sonus21 .rqueue .models .Concurrency ;
4242import com .github .sonus21 .rqueue .models .db .MessageMetadata ;
4343import com .github .sonus21 .rqueue .models .db .QueueConfig ;
4444import com .github .sonus21 .rqueue .models .enums .MessageStatus ;
@@ -178,7 +178,8 @@ void setTaskExecutor() {
178178 @ Test
179179 void globalMaxRetryCapsDefaultRetryForever () throws Exception {
180180 beanProvider .getRqueueConfig ().setMaxRetry (5 );
181- doReturn (handlerMap (mapping (slowQueue , -1 , null ))).when (rqueueMessageHandler )
181+ doReturn (handlerMap (mapping (slowQueue , -1 , null )))
182+ .when (rqueueMessageHandler )
182183 .getHandlerMethodMap ();
183184
184185 container .afterPropertiesSet ();
@@ -189,7 +190,8 @@ void globalMaxRetryCapsDefaultRetryForever() throws Exception {
189190 @ Test
190191 void globalMaxRetryDoesNotOverrideExplicitRetryCount () throws Exception {
191192 beanProvider .getRqueueConfig ().setMaxRetry (2 );
192- doReturn (handlerMap (mapping (slowQueue , 10 , null ))).when (rqueueMessageHandler )
193+ doReturn (handlerMap (mapping (slowQueue , 10 , null )))
194+ .when (rqueueMessageHandler )
193195 .getHandlerMethodMap ();
194196
195197 container .afterPropertiesSet ();
@@ -200,7 +202,8 @@ void globalMaxRetryDoesNotOverrideExplicitRetryCount() throws Exception {
200202 @ Test
201203 void globalMaxRetryDoesNotRaiseLowerExplicitRetryCount () throws Exception {
202204 beanProvider .getRqueueConfig ().setMaxRetry (5 );
203- doReturn (handlerMap (mapping (slowQueue , 2 , null ))).when (rqueueMessageHandler )
205+ doReturn (handlerMap (mapping (slowQueue , 2 , null )))
206+ .when (rqueueMessageHandler )
204207 .getHandlerMethodMap ();
205208
206209 container .afterPropertiesSet ();
@@ -211,7 +214,8 @@ void globalMaxRetryDoesNotRaiseLowerExplicitRetryCount() throws Exception {
211214 @ Test
212215 void globalMaxRetryCanDisableRetries () throws Exception {
213216 beanProvider .getRqueueConfig ().setMaxRetry (0 );
214- doReturn (handlerMap (mapping (slowQueue , -1 , null ))).when (rqueueMessageHandler )
217+ doReturn (handlerMap (mapping (slowQueue , -1 , null )))
218+ .when (rqueueMessageHandler )
215219 .getHandlerMethodMap ();
216220
217221 container .afterPropertiesSet ();
@@ -222,12 +226,14 @@ void globalMaxRetryCanDisableRetries() throws Exception {
222226 @ Test
223227 void globalMaxRetryDoesNotOverrideDeadLetterDefaultRetryCount () throws Exception {
224228 beanProvider .getRqueueConfig ().setMaxRetry (0 );
225- doReturn (handlerMap (mapping (slowQueue , -1 , slowQueue + "-dlq" ))).when (rqueueMessageHandler )
229+ doReturn (handlerMap (mapping (slowQueue , -1 , slowQueue + "-dlq" )))
230+ .when (rqueueMessageHandler )
226231 .getHandlerMethodMap ();
227232
228233 container .afterPropertiesSet ();
229234
230- assertEquals (Constants .DEFAULT_RETRY_DEAD_LETTER_QUEUE ,
235+ assertEquals (
236+ Constants .DEFAULT_RETRY_DEAD_LETTER_QUEUE ,
231237 EndpointRegistry .get (slowQueue ).getNumRetry ());
232238 }
233239
0 commit comments