Profiler { public void print() { String head=String.format(Format, "started","stoped","elapsed(mills)","average(mills)","profilerNode"); System.out.println(head); printTree(); } Profiler(Profiler parent,String name,int level); static Profiler newRoot(); boolean isRoot(); String getName(); Collection<Profiler> children(); Profiler child(String path); void print(); long getStarted(); ProfilerWatch start(); long getStoped(); static Profiler empty();  }
@Test public void studyPath() throws InterruptedException{ print("",0); print(" ",1); print("a",1); print("a/b",2); print("/a/b",2); try { print(null,0); fail(); } catch (Exception e) { } }