@Override
    protected void getReferenceCountInfoTestHook(
        ConcurrentMap<Long, List<RefCountChangeInfo>> stackTraces, long address) {
      List<RefCountChangeInfo> updatedList =
          new ArrayList<>(stackTraces.get(address));
      RefCountChangeInfo refCountChangeInfo = new RefCountChangeInfo(false, 0, "TestOwner");
      updatedList.add(refCountChangeInfo);
      stackTraces.put(address, updatedList);
    }
Update list of stack traces for address. Hooked SUT should see that the list changed.
geode-core/src/test/java/org/apache/geode/internal/offheap/ReferenceCountHelperImplTest.java