private static TestProxy readNode(final ObjectReader reader) {
   final TestProxy node = reader.readObject();
   final int childCount = reader.readInt();
   for (int i = 0; i < childCount; i++) {
     node.addChild(readNode(reader));
   }
   return node;
 }
 public void notifyFinish(ObjectReader reader) {
   myIsTerminated = true;
   synchronized (myCurrentTests) {
     myCurrentTests.clear();
   }
   final JUnitRunningModel model = getModel();
   if (model != null) {
     model.getNotifier().fireRunnerStateChanged(new CompletionEvent(true, reader.readInt()));
     TestStatusListener.notifySuiteFinished(model.getRoot(), model.getProject());
     terminateStillRunning(model);
   }
 }
  public void notifyTestResult(ObjectReader reader) {
    final TestProxy testProxy = reader.readObject();

    if (testProxy.getParent() == null) { // model.getRoot() == testProxy
      getDynamicParent(myModel, testProxy).insertNextRunningChild(testProxy);
    }

    final int state = reader.readInt();
    final StateChanger stateChanger = STATE_CLASSES.get(state);
    stateChanger.changeStateOf(testProxy, reader);
    synchronized (myCurrentTests) {
      if (stateChanger instanceof RunningStateSetter) {
        myCurrentTests.add(testProxy);
      } else {
        myCurrentTests.remove(testProxy);
      }
    }
  }
 public Statistics(final ObjectReader reader) {
   myTime = reader.readInt();
   myBeforeMemory = reader.readLong();
   myAfterMemory = reader.readLong();
 }