justinleet commented on a change in pull request #1554: METRON-2307: Migrate to 
JUnit5
URL: https://github.com/apache/metron/pull/1554#discussion_r347037411
 
 

 ##########
 File path: 
metron-platform/metron-common-streaming/metron-common-storm/src/test/java/org/apache/metron/storm/common/utils/ErrorUtilsTest.java
 ##########
 @@ -21,25 +21,23 @@
 import org.apache.metron.common.error.MetronError;
 import org.apache.metron.test.error.MetronErrorJSONMatcher;
 import org.apache.storm.task.OutputCollector;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.mockito.ArgumentMatchers;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.argThat;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.Mockito.*;
 
 public class ErrorUtilsTest {
 
   @Test
-  public void handleErrorShouldEmitAndReportError() throws Exception {
+  public void handleErrorShouldEmitAndReportError() {
     Throwable e = new Exception("error");
     MetronError error = new MetronError().withMessage("error 
message").withThrowable(e);
     OutputCollector collector = mock(OutputCollector.class);
 
     StormErrorUtils.handleError(collector, error);
-    verify(collector, times(1)).emit(eq(Constants.ERROR_STREAM), argThat(new 
MetronErrorJSONMatcher(error.getJSONObject())));
+    verify(collector, 
times(1)).emit(ArgumentMatchers.eq(Constants.ERROR_STREAM), argThat(new 
MetronErrorJSONMatcher(error.getJSONObject())));
 
 Review comment:
   Dropped them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to