@@ -94,15 +94,15 @@ public void testSendMessage_MethodNameSetInContext() {
9494 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
9595 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
9696 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
97- when (mockRestHandler .sendMessage (anyString ( ), anyString (), any ( ServerCallContext . class ))).thenReturn (mockHttpResponse );
97+ when (mockRestHandler .sendMessage (any ( ServerCallContext . class ), anyString (), anyString ( ))).thenReturn (mockHttpResponse );
9898
9999 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
100100
101101 // Act
102102 routes .sendMessage ("{}" , mockRoutingContext );
103103
104104 // Assert
105- verify (mockRestHandler ).sendMessage (eq ( "{}" ), anyString (), contextCaptor . capture ( ));
105+ verify (mockRestHandler ).sendMessage (contextCaptor . capture ( ), anyString (), eq ( "{}" ));
106106 ServerCallContext capturedContext = contextCaptor .getValue ();
107107 assertNotNull (capturedContext );
108108 assertEquals (SEND_MESSAGE_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -115,7 +115,7 @@ public void testSendMessageStreaming_MethodNameSetInContext() {
115115 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
116116 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
117117 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
118- when (mockRestHandler .sendStreamingMessage (anyString ( ), anyString (), any ( ServerCallContext . class )))
118+ when (mockRestHandler .sendStreamingMessage (any ( ServerCallContext . class ), anyString (), anyString ( )))
119119 .thenReturn (mockHttpResponse );
120120
121121 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
@@ -124,7 +124,7 @@ public void testSendMessageStreaming_MethodNameSetInContext() {
124124 routes .sendMessageStreaming ("{}" , mockRoutingContext );
125125
126126 // Assert
127- verify (mockRestHandler ).sendStreamingMessage (eq ( "{}" ), anyString (), contextCaptor . capture ( ));
127+ verify (mockRestHandler ).sendStreamingMessage (contextCaptor . capture ( ), anyString (), eq ( "{}" ));
128128 ServerCallContext capturedContext = contextCaptor .getValue ();
129129 assertNotNull (capturedContext );
130130 assertEquals (SEND_STREAMING_MESSAGE_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -138,15 +138,15 @@ public void testGetTask_MethodNameSetInContext() {
138138 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
139139 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
140140 when (mockHttpResponse .getBody ()).thenReturn ("{test:value}" );
141- when (mockRestHandler .getTask (anyString ( ), any (), anyString (), any (ServerCallContext . class ))).thenReturn (mockHttpResponse );
141+ when (mockRestHandler .getTask (any ( ServerCallContext . class ), anyString (), anyString (), any ())).thenReturn (mockHttpResponse );
142142
143143 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
144144
145145 // Act
146146 routes .getTask (mockRoutingContext );
147147
148148 // Assert
149- verify (mockRestHandler ).getTask (eq ( "task123" ), any (), anyString ( ), contextCaptor . capture ());
149+ verify (mockRestHandler ).getTask (contextCaptor . capture ( ), anyString (), eq ( "task123" ), any ());
150150 ServerCallContext capturedContext = contextCaptor .getValue ();
151151 assertNotNull (capturedContext );
152152 assertEquals (GET_TASK_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -160,15 +160,15 @@ public void testCancelTask_MethodNameSetInContext() {
160160 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
161161 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
162162 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
163- when (mockRestHandler .cancelTask (anyString ( ), anyString (), any ( ServerCallContext . class ))).thenReturn (mockHttpResponse );
163+ when (mockRestHandler .cancelTask (any ( ServerCallContext . class ), anyString (), anyString ( ))).thenReturn (mockHttpResponse );
164164
165165 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
166166
167167 // Act
168168 routes .cancelTask (mockRoutingContext );
169169
170170 // Assert
171- verify (mockRestHandler ).cancelTask (eq ( "task123" ), anyString (), contextCaptor . capture ( ));
171+ verify (mockRestHandler ).cancelTask (contextCaptor . capture ( ), anyString (), eq ( "task123" ));
172172 ServerCallContext capturedContext = contextCaptor .getValue ();
173173 assertNotNull (capturedContext );
174174 assertEquals (CANCEL_TASK_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -182,7 +182,7 @@ public void testResubscribeTask_MethodNameSetInContext() {
182182 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
183183 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
184184 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
185- when (mockRestHandler .subscribeToTask (anyString ( ), anyString (), any ( ServerCallContext . class )))
185+ when (mockRestHandler .subscribeToTask (any ( ServerCallContext . class ), anyString (), anyString ( )))
186186 .thenReturn (mockHttpResponse );
187187
188188 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
@@ -191,7 +191,7 @@ public void testResubscribeTask_MethodNameSetInContext() {
191191 routes .subscribeToTask (mockRoutingContext );
192192
193193 // Assert
194- verify (mockRestHandler ).subscribeToTask (eq ( "task123" ), anyString (), contextCaptor . capture ( ));
194+ verify (mockRestHandler ).subscribeToTask (contextCaptor . capture ( ), anyString (), eq ( "task123" ));
195195 ServerCallContext capturedContext = contextCaptor .getValue ();
196196 assertNotNull (capturedContext );
197197 assertEquals (SUBSCRIBE_TO_TASK_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -205,16 +205,15 @@ public void testSetTaskPushNotificationConfiguration_MethodNameSetInContext() {
205205 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
206206 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
207207 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
208- when (mockRestHandler .setTaskPushNotificationConfiguration (anyString (), anyString (), anyString (),
209- any (ServerCallContext .class ))).thenReturn (mockHttpResponse );
208+ when (mockRestHandler .setTaskPushNotificationConfiguration (any (ServerCallContext .class ), anyString (), anyString (), anyString ())).thenReturn (mockHttpResponse );
210209
211210 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
212211
213212 // Act
214213 routes .setTaskPushNotificationConfiguration ("{}" , mockRoutingContext );
215214
216215 // Assert
217- verify (mockRestHandler ).setTaskPushNotificationConfiguration (eq ( "task123" ), eq ("{}" ), anyString (), contextCaptor . capture ( ));
216+ verify (mockRestHandler ).setTaskPushNotificationConfiguration (contextCaptor . capture ( ), anyString (), eq ("{}" ), eq ( "task123" ));
218217 ServerCallContext capturedContext = contextCaptor .getValue ();
219218 assertNotNull (capturedContext );
220219 assertEquals (SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -229,17 +228,16 @@ public void testGetTaskPushNotificationConfiguration_MethodNameSetInContext() {
229228 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
230229 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
231230 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
232- when (mockRestHandler .getTaskPushNotificationConfiguration (anyString (), anyString (), anyString (),
233- any (ServerCallContext .class ))).thenReturn (mockHttpResponse );
231+ when (mockRestHandler .getTaskPushNotificationConfiguration (any (ServerCallContext .class ), anyString (), anyString (), anyString ())).thenReturn (mockHttpResponse );
234232
235233 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
236234
237235 // Act
238236 routes .getTaskPushNotificationConfiguration (mockRoutingContext );
239237
240238 // Assert
241- verify (mockRestHandler ).getTaskPushNotificationConfiguration (eq ( "task123" ), eq ( "config456" ), anyString ( ),
242- contextCaptor . capture ( ));
239+ verify (mockRestHandler ).getTaskPushNotificationConfiguration (contextCaptor . capture ( ), anyString ( ), eq ( "task123" ),
240+ eq ( "config456" ));
243241 ServerCallContext capturedContext = contextCaptor .getValue ();
244242 assertNotNull (capturedContext );
245243 assertEquals (GET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -253,7 +251,7 @@ public void testListTaskPushNotificationConfigurations_MethodNameSetInContext()
253251 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
254252 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
255253 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
256- when (mockRestHandler .listTaskPushNotificationConfigurations (anyString ( ), anyInt (), anyString (), anyString (), any ( ServerCallContext . class )))
254+ when (mockRestHandler .listTaskPushNotificationConfigurations (any ( ServerCallContext . class ), anyString (), anyString (), anyInt (), anyString ( )))
257255 .thenReturn (mockHttpResponse );
258256
259257 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
@@ -262,7 +260,7 @@ public void testListTaskPushNotificationConfigurations_MethodNameSetInContext()
262260 routes .listTaskPushNotificationConfigurations (mockRoutingContext );
263261
264262 // Assert
265- verify (mockRestHandler ).listTaskPushNotificationConfigurations (eq ( "task123" ), anyInt (), anyString ( ), anyString (), contextCaptor . capture ());
263+ verify (mockRestHandler ).listTaskPushNotificationConfigurations (contextCaptor . capture ( ), anyString (), eq ( "task123" ), anyInt (), anyString ());
266264 ServerCallContext capturedContext = contextCaptor .getValue ();
267265 assertNotNull (capturedContext );
268266 assertEquals (LIST_TASK_PUSH_NOTIFICATION_CONFIG_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
@@ -277,17 +275,16 @@ public void testDeleteTaskPushNotificationConfiguration_MethodNameSetInContext()
277275 when (mockHttpResponse .getStatusCode ()).thenReturn (200 );
278276 when (mockHttpResponse .getContentType ()).thenReturn ("application/json" );
279277 when (mockHttpResponse .getBody ()).thenReturn ("{}" );
280- when (mockRestHandler .deleteTaskPushNotificationConfiguration (anyString (), anyString (), anyString (),
281- any (ServerCallContext .class ))).thenReturn (mockHttpResponse );
278+ when (mockRestHandler .deleteTaskPushNotificationConfiguration (any (ServerCallContext .class ), anyString (), anyString (), anyString ())).thenReturn (mockHttpResponse );
282279
283280 ArgumentCaptor <ServerCallContext > contextCaptor = ArgumentCaptor .forClass (ServerCallContext .class );
284281
285282 // Act
286283 routes .deleteTaskPushNotificationConfiguration (mockRoutingContext );
287284
288285 // Assert
289- verify (mockRestHandler ).deleteTaskPushNotificationConfiguration (eq ( "task123" ), eq ( "config456" ), anyString ( ),
290- contextCaptor . capture ( ));
286+ verify (mockRestHandler ).deleteTaskPushNotificationConfiguration (contextCaptor . capture ( ), anyString ( ), eq ( "task123" ),
287+ eq ( "config456" ));
291288 ServerCallContext capturedContext = contextCaptor .getValue ();
292289 assertNotNull (capturedContext );
293290 assertEquals (DELETE_TASK_PUSH_NOTIFICATION_CONFIG_METHOD , capturedContext .getState ().get (METHOD_NAME_KEY ));
0 commit comments