@Test
   public void testCleanSweepUpdate() {
      System.out.println("Test cleanSweepUpdate()");
      VirtualHouse vh = new VirtualHouse(true);
      CleanSweepRobot robot = new CleanSweepRobot(vh);
      SensorInterface si = new SensorInterface();
      direction n = direction.NORTH;
      direction e = direction.EAST;
      direction s = direction.SOUTH;
      direction w = direction.WEST;
      /*verify that instantation of the CleanSweepRobot got it's starting location*/

      vh.getInitialLocation(si);
      assertEquals(si.startingXCoord, Integer.MAX_VALUE);
      assertEquals(si.startingYCoord, Integer.MAX_VALUE);
      /*first move return true*/

      CleanSweepRobot csr = new CleanSweepRobot(vh,0,0);
      System.out.println("--verify move 1");
      assertEquals(csr.cleanSweepUpdate(), true);
      /*have no access to robot variables but we can check Virtual house 
       * see where it has moved to*/

      vh.sensorInformation(si);
      assertEquals(si.atChargingStation, false);
      assertEquals(si.dirtPresent, true);
      assertEquals(si.floor, floorType.BARE_FLOOR);
      assertEquals(si.features[n.index()], feature.OPEN);
      assertEquals(si.features[e.index()], feature.OBSTICLE);
      assertEquals(si.features[s.index()], feature.OBSTICLE);
      assertEquals(si.features[w.index()], feature.OPEN);
      System.out.println("--verify move 2");
      assertEquals(csr.cleanSweepUpdate(), true);
      vh.sensorInformation(si);
      assertEquals(si.atChargingStation, false);
      assertEquals(si.dirtPresent, true);
      assertEquals(si.floor, floorType.BARE_FLOOR);
      assertEquals(si.features[n.index()], feature.OBSTICLE);
      assertEquals(si.features[e.index()], feature.OBSTICLE);
      assertEquals(si.features[s.index()], feature.OPEN);
      assertEquals(si.features[w.index()], feature.OBSTICLE);
      System.out.println("--verify move battery low return to charging station");
      assertEquals(csr.cleanSweepUpdate(), true);
      assertEquals(csr.cleanSweepUpdate(), true);
      vh.sensorInformation(si);
      assertEquals(si.atChargingStation, true);
      assertEquals(csr.cleanSweepUpdate(), true);
      assertEquals(csr.cleanSweepUpdate(), true);
      System.out.println("--and back to location where it ran out of battery");
      vh.sensorInformation(si);
      assertEquals(si.atChargingStation, false);
      assertEquals(si.dirtPresent, true);
      assertEquals(si.floor, floorType.BARE_FLOOR);
      assertEquals(si.features[n.index()], feature.OBSTICLE);
      assertEquals(si.features[e.index()], feature.OBSTICLE);
      assertEquals(si.features[s.index()], feature.OPEN);
      assertEquals(si.features[w.index()], feature.OBSTICLE);     
      assertEquals(csr.cleanSweepUpdate(), true);
      assertEquals(csr.cleanSweepUpdate(), true);
      assertEquals(csr.cleanSweepUpdate(), true);
      vh.sensorInformation(si);
      assertEquals(si.atChargingStation, false);
      assertEquals(si.dirtPresent, true);
      assertEquals(si.floor, floorType.HIGH_PILE_CARPET);
      assertEquals(si.features[n.index()], feature.OPEN);
      assertEquals(si.features[e.index()], feature.OBSTICLE);
      assertEquals(si.features[s.index()], feature.OPEN);
      assertEquals(si.features[w.index()], feature.OBSTICLE);
      assertEquals(csr.cleanSweepUpdate(), true);
      vh.sensorInformation(si);
      assertEquals(si.atChargingStation, false);
      assertEquals(si.dirtPresent, true); 
      assertEquals(si.floor, floorType.LOW_PILE_CARPET);
      assertEquals(si.features[n.index()], feature.STAIRS);
      assertEquals(si.features[e.index()], feature.OBSTICLE);
      assertEquals(si.features[s.index()], feature.OPEN);
      assertEquals(si.features[w.index()], feature.OBSTICLE);
      assertEquals(csr.cleanSweepUpdate(), true);
      assertEquals(csr.cleanSweepUpdate(), true);
      vh.sensorInformation(si);
      assertEquals(si.atChargingStation, true);
      assertEquals(si.dirtPresent, true);
      assertEquals(si.floor, floorType.BARE_FLOOR);
      assertEquals(si.features[n.index()], feature.OPEN);
      assertEquals(si.features[e.index()], feature.OPEN);
      assertEquals(si.features[s.index()], feature.OBSTICLE);
      assertEquals(si.features[w.index()], feature.OBSTICLE);  
      assertEquals(csr.cleanSweepUpdate(), false);
      /*two files were created, check them*/

      System.out.println("--verify FloorPlanDump.xml was correctly created");
      String line = null;
      BufferedReader br = null;
      File f = new File("FloorPlanDump.xml");
      try {
         br = new BufferedReader(new FileReader(f));
      } catch (Exception t) {
         fail("FloorPlanDump.xml was not created");
      }
      for (int i = 0; i < floorDump.length; i++) {
         try {
            line = br.readLine();
         } catch (Exception t) {
            fail("FloorPlanDump.xml cannot be read (probably not closed)");
         }
         assertEquals(line, floorDump[i]);
      }
      try {
         br.close();
      } catch (Exception t) {
         fail("FloorPlanDump.xml was not created");
      }
       System.out.println("--verify ActivityLog.csv was correctly created");
      f = new File("ActivityLog.csv");
      try {
         br = new BufferedReader(new FileReader(f));
      } catch (Exception t) {
         fail("ActivityLog.txt was not created");
      }
      /*just check the first 16 lines of the log file*/
      for (int i = 0; i < 16; i++) {
         try {
            line = br.readLine();
         } catch (Exception t) {
            fail("FloorPlanDump.xml cannot be read (probably not closed)");
         }
         assertEquals(line, log[i]);
      }
      try {
         br.close();
      } catch (Exception t) {
         fail("ActivityLog.txt was not created");
      }     
   }