private static void addResourceInstsToSet(final File archiveFile, final String specString,
      final Set<ResourceInst> resourceInsts) throws IOException {
    StatSpec statSpec = new StatSpec(specString);

    StatArchiveReader reader =
        new StatArchiveReader(new File[] {archiveFile}, new StatSpec[] {statSpec}, true);
    StatValue[] statValues = reader.matchSpec(statSpec);

    for (StatValue statValue : statValues) {
      for (ResourceInst resourceInst : statValue.getResources()) {
        resourceInsts.add(resourceInst);
      }
    }
  }
final File expectedStatArchiveFile = new File(TestUtil.getResourcePath(getClass(),
"StatArchiveWriterReaderJUnitTest_" + this.testName.getMethodName() + "_expected.gfs"));
geode-junit/src/main/java/org/apache/geode/internal/statistics/StatUtils.java