mhansonp commented on code in PR #7608: URL: https://github.com/apache/geode/pull/7608#discussion_r857984886
########## geode-core/src/distributedTest/java/org/apache/geode/cache/client/ClientServerRegisterInterestsDUnitTest.java: ########## @@ -224,27 +205,27 @@ public void testClientRegisterInterests() { Region<String, String> example = clientCache.getRegion(SEPARATOR + "Example"); assertNotNull("'Example' Region in Client Cache was not found!", example); - assertEquals(1, example.size()); + assertThat(example.size()).isEqualTo(1); assertTrue(example.containsKey("1")); - assertEquals("ONE", example.get("1")); + assertThat(example.get("1")).isEqualTo("ONE"); Review Comment: introducing three checks into a single lines means each of those checks can assert. When only "ONE" is present you get the following error. assertThat(example).containsOnly(entry("1", "TWO")); java.lang.AssertionError: Expecting map: {"1"="ONE"} to contain only: ["1"="TWO"] map entries not found: ["1"="TWO"] and map entries not expected: ["1"="ONE"] Or you can get use assertThat(example.get("1")).isEqualTo("TWO"); and get the more intelligible org.opentest4j.AssertionFailedError: expected: "TWO" but was: "ONE" -- 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: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org