public static void assertCounterSizes(String conflation) {
    // we do 5 puts on each key, so:

    // for writer 1 default conflation is on
    final int create1 = 1;
    int update1 = 1;
    // for writer 2 default conflation is off
    final int create2 = 1;
    int update2 = 4;

    if (conflation.equals(CLIENT_CONFLATION_PROP_VALUE_ON)) {
      // override
      update2 = 1;
    } else if (conflation.equals(CLIENT_CONFLATION_PROP_VALUE_OFF)) {
      // override
      update1 = 4;
    }

    WaitCriterion ev = new WaitCriterion() {
      @Override
      public boolean done() {
        Thread.yield(); // TODO is this necessary?
        return counterCreate1 == create1;
      }

      @Override
      public String description() {
        return null;
      }
    };
    GeodeAwaitility.await().untilAsserted(ev);

    final int u1 = update1;
    ev = new WaitCriterion() {
      @Override
      public boolean done() {
        Thread.yield(); // TODO is this necessary?
        return counterUpdate1 == u1;
      }

      @Override
      public String description() {
        return null;
      }
    };
    GeodeAwaitility.await().untilAsserted(ev);

    ev = new WaitCriterion() {
      @Override
      public boolean done() {
        Thread.yield(); // TODO is this necessary?
        return counterCreate2 == create2;
      }

      @Override
      public String description() {
        return null;
      }
    };
    GeodeAwaitility.await().untilAsserted(ev);

    final int u2 = update2;
    ev = new WaitCriterion() {
      @Override
      public boolean done() {
        Thread.yield(); // TODO is this necessary?
        return counterUpdate2 == u2;
      }

      @Override
      public String description() {
        return null;
      }
    };
    GeodeAwaitility.await().untilAsserted(ev);
  }
assert the listener counters size are as expected
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientConflationDistributedTest.java