void
TunnelInterfaceRegTest::dataReceived(RequestID requestID, ReplyData replyData)
{
   if(replyData.getTotalDataSize() == 0) {
      m_state = ERROR;
      setTestFailed("ReplyData did not contain any data");
   } else {
      coreprintln("dataReceived!");
      
      if(m_state == WEB_REQ) {
         bool res = writeFile(replyData, "webpage.txt");
         if(!res) {
            m_state = ERROR;
            setTestFailed("Where not able to write to file");
         }
         if(replyData.isComplete()) {
            WFString URL = "http://TMap/B;cat_vf_vodafoneshop.png";
            AsynchronousStatus status =
               m_tunnelInterface.requestData(URL);
            m_state = PIC_REQ;
            if(status.getStatusCode() != OK) {
               m_state = ERROR;
               setTestFailed(status.getStatusMessage());
            }
         }
      } else if(m_state == PIC_REQ) {
         bool res = writeFile(replyData, "picture.png");
         if(!res) {
            m_state = ERROR;
            setTestFailed("Where not able to write to file");
         }
         if(replyData.isComplete()) {
            m_state = DONE;
            setTestPassed();
         }
      }
   }


}