StringWriter writer = new StringWriter();
HierarchyWriter hw = new HierarchyWriter(getHierarchy());
Timer timer = new Timer();
hw.writeHierarchy(writer);
int MAX_TIME = 2000;
assertTrue("Too long to save hierarchy: " + timer.elapsed() + "ms for "
+ count + " references (max total time " + MAX_TIME + "ms)",
timer.elapsed() < MAX_TIME);
}
private int fill(JPanel pane, int level, int nsubs) {