@@ -147,9 +147,6 @@ public void basicGetAndAck() {
147147 metrics .cleanStaleState ();
148148 assertThat (failedToPublishMessages (metrics ), is (2L ));
149149 assertThat (publishedMessages (metrics ), is (2L ));
150-
151- long anyDeliveryTag = 123L ;
152- metrics .basicNack (channel , anyDeliveryTag );
153150 }
154151
155152
@@ -158,55 +155,55 @@ public void basicGetAndAck() {
158155 AbstractMetricsCollector metrics = factory .create ();
159156 Channel channel = mock (Channel .class );
160157 // begins with no messages acknowledged
161- assertThat (publishAck (metrics ), is (0 ));
158+ assertThat (publishAck (metrics ), is (0L ));
162159 // first acknowledgement gets tracked
163160 metrics .basicPublishAck (channel , anyDeliveryTag , false );
164- assertThat (publishAck (metrics ), is (1 ));
161+ assertThat (publishAck (metrics ), is (1L ));
165162 // second acknowledgement gets tracked
166163 metrics .basicPublishAck (channel , anyDeliveryTag , false );
167- assertThat (publishAck (metrics ), is (2 ));
164+ assertThat (publishAck (metrics ), is (2L ));
168165 // multiple deliveries aren't tracked
169166 metrics .basicPublishAck (channel , anyDeliveryTag , true );
170- assertThat (publishAck (metrics ), is (2 ));
167+ assertThat (publishAck (metrics ), is (2L ));
171168 // cleaning stale state doesn't affect the metric
172169 metrics .cleanStaleState ();
173- assertThat (publishAck (metrics ), is (2 ));
170+ assertThat (publishAck (metrics ), is (2L ));
174171 }
175172
176173 @ Test public void publishingNotAcknowledgements () {
177174 long anyDeliveryTag = 123L ;
178175 AbstractMetricsCollector metrics = factory .create ();
179176 Channel channel = mock (Channel .class );
180177 // begins with no messages not-acknowledged
181- assertThat (publishNack (metrics ), is (0 ));
178+ assertThat (publishNack (metrics ), is (0L ));
182179 // first not-acknowledgement gets tracked
183180 metrics .basicPublishNack (channel , anyDeliveryTag , false );
184- assertThat (publishNack (metrics ), is (1 ));
181+ assertThat (publishNack (metrics ), is (1L ));
185182 // second not-acknowledgement gets tracked
186183 metrics .basicPublishNack (channel , anyDeliveryTag , false );
187- assertThat (publishNack (metrics ), is (2 ));
184+ assertThat (publishNack (metrics ), is (2L ));
188185 // multiple deliveries aren't tracked
189186 metrics .basicPublishNack (channel , anyDeliveryTag , true );
190- assertThat (publishNack (metrics ), is (2 ));
187+ assertThat (publishNack (metrics ), is (2L ));
191188 // cleaning stale state doesn't affect the metric
192189 metrics .cleanStaleState ();
193- assertThat (publishNack (metrics ), is (2 ));
190+ assertThat (publishNack (metrics ), is (2L ));
194191 }
195192
196193 @ Test public void publishingUnrouted () {
197194 AbstractMetricsCollector metrics = factory .create ();
198195 Channel channel = mock (Channel .class );
199196 // begins with no messages not-acknowledged
200- assertThat (publishUnrouted (metrics ), is (0 ));
197+ assertThat (publishUnrouted (metrics ), is (0L ));
201198 // first unrouted gets tracked
202199 metrics .basicPublishUnrouted (channel );
203- assertThat (publishUnrouted (metrics ), is (1 ));
200+ assertThat (publishUnrouted (metrics ), is (1L ));
204201 // second unrouted gets tracked
205202 metrics .basicPublishUnrouted (channel );
206- assertThat (publishUnrouted (metrics ), is (2 ));
203+ assertThat (publishUnrouted (metrics ), is (2L ));
207204 // cleaning stale state doesn't affect the metric
208205 metrics .cleanStaleState ();
209- assertThat (publishUnrouted (metrics ), is (2 ));
206+ assertThat (publishUnrouted (metrics ), is (2L ));
210207 }
211208
212209 @ Test public void cleanStaleState () {
0 commit comments