class AbstractResumeBreakPointManager implements ResumeBreakPointManager, Closeable {

    protected final String getInventoryPositionData() {
        JsonObject result = new JsonObject();
        JsonObject unfinished = new JsonObject();
        Set<String> finished = Sets.newHashSet();
        for (Entry<String, PositionManager<InventoryPosition>> entry : inventoryPositionManagerMap.entrySet()) {
            if (entry.getValue().getPosition() instanceof FinishedInventoryPosition) {
                finished.add(entry.getKey());
                continue;
            }
            unfinished.add(entry.getKey(), entry.getValue().getPosition().toJson());
        }
        result.add(UNFINISHED, unfinished);
        result.add(FINISHED, GSON.toJsonTree(finished));
        return result.toString();
    }

}