snuyanzin commented on code in PR #28622:
URL: https://github.com/apache/flink/pull/28622#discussion_r3695562852


##########
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/compiler/NFACompilerTest.java:
##########
@@ -129,48 +116,50 @@ public void testNFACompilerWithSimplePattern() {
         NFA<Event> nfa = compile(pattern, false);
 
         Collection<State<Event>> states = nfa.getStates();
-        assertEquals(4, states.size());
+        assertThat(states).hasSize(4);
 
         Map<String, State<Event>> stateMap = new HashMap<>();
         for (State<Event> state : states) {
             stateMap.put(state.getName(), state);
         }
 
-        assertTrue(stateMap.containsKey("start"));
+        assertThat(stateMap).containsKey("start");
         State<Event> startState = stateMap.get("start");
-        assertTrue(startState.isStart());
+        assertThat(startState.isStart()).isTrue();
         final Set<Tuple2<String, StateTransitionAction>> startTransitions =
                 unfoldTransitions(startState);
-        assertEquals(
-                Sets.newHashSet(Tuple2.of("middle", 
StateTransitionAction.TAKE)), startTransitions);
+        assertThat(startTransitions)
+                .isEqualTo(Sets.newHashSet(Tuple2.of("middle", 
StateTransitionAction.TAKE)));
 
-        assertTrue(stateMap.containsKey("middle"));
+        assertThat(stateMap).containsKey("middle");
         State<Event> middleState = stateMap.get("middle");
         final Set<Tuple2<String, StateTransitionAction>> middleTransitions =
                 unfoldTransitions(middleState);
-        assertEquals(
-                Sets.newHashSet(
-                        Tuple2.of("middle", StateTransitionAction.IGNORE),
-                        Tuple2.of("end", StateTransitionAction.TAKE)),
-                middleTransitions);
+        assertThat(middleTransitions)
+                .isEqualTo(
+                        Sets.newHashSet(

Review Comment:
   Why do we need guava usage here instead of just `containExactlyInOanyOrder`?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to