private List<HeapHistogramEntry> processOutput(final String output) {
        Preconditions.checkNotNull(output);

        try {
            final Predicate<String> classNamePredicate = getClassNameMatchPredicate();
            final Function<String, String> classNameReplacer = getClassReplacementMapper();
            final Function<String, Optional<HeapHistogramEntry>> lineToEntryMapper =
                    buildLineToEntryMapper(classNameReplacer);

            String[] lines = output.split("\\r?\\n");

            LOGGER.debug("processing {} lines of stdout", lines.length);

            final List<HeapHistogramService.HeapHistogramEntry> histogramEntries = Arrays
                    .stream(lines)
                    .map(lineToEntryMapper)
                    .filter(Optional::isPresent)
                    .map(Optional::get)
                    .filter(heapHistogramEntry ->
                            classNamePredicate.test(heapHistogramEntry.getClassName()))
                    .collect(Collectors.toList());

            LOGGER.debug("histogramEntries size [{}]", histogramEntries.size());
            if (histogramEntries.size() == 0) {
                LOGGER.error("Something has gone wrong filtering the heap histogram, zero entries returned");
            }
            return histogramEntries;

        } catch (final RuntimeException e) {
            throw new RuntimeException(LogUtil.message("Error processing output string [{}]",
                    getTruncatedStr(output)), e);
        }
    }
Generates a heap histogram using the 'gcClassHistogram' MBean action.  Will
block until the action completes/fails.
list of {@link HeapHistogramEntry}
stroom-node/stroom-node-impl/src/main/java/stroom/node/impl/HeapHistogramService.java