alb3rtobr commented on a change in pull request #6393:
URL: https://github.com/apache/geode/pull/6393#discussion_r650297169



##########
File path: 
geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigJUnitTest.java
##########
@@ -235,55 +232,59 @@ public void everyGetterSetterSameNameSameType() {
     for (String attr : getters.keySet()) {
       Method getter = getters.get(attr);
       Method setter = setters.get(attr);
-      assertNotNull("every getter should have a corresponding setter " + attr, 
setter);
+      assertThat(setter).as("every getter should have a corresponding setter " 
+ attr).isNotNull();
       String setterName = setter.getName();
       String getterName = getter.getName();
-      assertEquals(setterName.substring(setterName.indexOf("set") + 3),
-          getterName.substring(getterName.indexOf("get") + 3));
-      assertEquals(setter.getParameterTypes()[0], getter.getReturnType());
+      assertThat(getterName.substring(getterName.indexOf("get") + 3))
+          .isEqualTo(setterName.substring(setterName.indexOf("set") + 3));
+      
assertThat(getter.getReturnType()).isEqualTo(setter.getParameterTypes()[0]);

Review comment:
       I have refactored the assertion about the setter and getter names as:
   ```
   String attrNameInGetterSignature = getter.getName().substring(3);
   assertThat(setter.getName()).contains(attrNameInGetterSignature);
   ```
   I think now its easier to understand what it is being checked there.




-- 
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:
[email protected]


Reply via email to