public void testAddAircraftObjectThatAlreadyExists() {

    try {
      objectService.addDataObject(federationExecutionID, aircraft);
      fail("Should have thrown an exception for " + "attempting to add a duplicate object");
    } catch (MuthurException e) {
      System.out.println(e.getLocalizedMessage());
    }
  }
  public void testAddAircraftObject() {

    aircraft = null;

    try {
      aircraft = new Aircraft(tailNumber, callSign);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    try {
      objectService.addDataObject(federationExecutionID, aircraft);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }
  }
  public void testAddAirportObject() {

    airportConfiguration = null;

    try {
      airportConfiguration = new AirportConfiguration(airportCode);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    try {
      objectService.addDataObject(federationExecutionID, airportConfiguration);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }
  }
  public void testAddFlightPlanObject() {

    // create a flight plan

    flightPlan = null;

    try {
      flightPlan = new FlightPlan(tailNumber, callSign);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    flightPlan.setSource(source);
    flightPlan.setAircraftType(aircraftType);
    flightPlan.setPlannedDepartureTimeMSecs(System.currentTimeMillis());
    flightPlan.setPlannedArrivalTimeMSecs(System.currentTimeMillis() + 30000);
    flightPlan.setCruiseSpeedKts(cruiseSpeedKts);
    flightPlan.setCruiseAltitudeFt(cruiseAltitudeFeet);
    flightPlan.setRoutePlan(route);
    flightPlan.setDepartureCenter(departureCenter);
    flightPlan.setArrivalCenter(arrivalCenter);
    flightPlan.setDepartureFix(departureFix);
    flightPlan.setArrivalFix(arrivalFix);
    flightPlan.setPhysicalAircraftClass(physicalClass);
    flightPlan.setWeightAircraftClass(weightClass);
    flightPlan.setUserAircraftClass(userClass);
    flightPlan.setNumOfAircraft(1);
    flightPlan.setAirborneEquipmentQualifier(airborneEquipmentQualifier);

    // add the flight plan

    try {
      objectService.addDataObject(federationExecutionID, flightPlan);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    assertObjectExists(flightPlan);
  }
  public void testAddAircraftTaxiOutObject() {

    aircraftTaxiOut = null;

    try {
      aircraftTaxiOut = new AircraftTaxiOut(tailNumber, callSign);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    aircraftTaxiOut.setTaxiOutTimeMSecs(System.currentTimeMillis());
    aircraftTaxiOut.setTaxiOutGate(taxiOutGate);

    // add the aircraft taxi in

    try {
      objectService.addDataObject(federationExecutionID, aircraftTaxiOut);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    assertObjectExists(aircraftTaxiOut);
  }
  public void testAddFlightPositionObject() {

    flightPosition = null;

    try {
      flightPosition = new FlightPosition(tailNumber, callSign);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    flightPosition.setLatitudeDegrees(latitudeDegrees);
    flightPosition.setLongitudeDegrees(longitudeDegrees);
    flightPosition.setAltitudeFt(altitudeFeet);
    flightPosition.setGroundspeedKts(groundSpeedKts);
    flightPosition.setHeadingDegrees(headingDegrees);
    flightPosition.setAirspeedKts(airSpeedKts);
    flightPosition.setPitchDegrees(pitchDegrees);
    flightPosition.setRollDegrees(rollDegrees);
    flightPosition.setYawDegrees(yawDegrees);
    flightPosition.setSector(sectorName);
    flightPosition.setCenter(centerName);
    flightPosition.setVerticalspeedKts(verticalspeedKts);
    flightPosition.setAircraftOnGround(true);
    flightPosition.setAircraftTransmissionFrequency(aircraftTransmissionFrequency);
    flightPosition.setSquawkCode(squawkCode);
    flightPosition.setIdent(true);

    // add the flight position

    try {
      objectService.addDataObject(federationExecutionID, flightPosition);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    assertObjectExists(flightPosition);
  }
  public void testAddAircraftArrivalObject() {

    aircraftArrival = null;

    try {
      aircraftArrival = new AircraftArrival(tailNumber, callSign);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    aircraftArrival.setActualArrivalTimeMSecs(System.currentTimeMillis());
    aircraftArrival.setArrivalAirportCode(arrivalAirportCode);
    aircraftArrival.setArrivalRunway(arrivalRunwayName);

    // add the aircraft arrival

    try {
      objectService.addDataObject(federationExecutionID, aircraftArrival);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    assertObjectExists(aircraftArrival);
  }
  public void testAddAircraftDepartureObject() {

    aircraftDeparture = null;

    try {
      aircraftDeparture = new AircraftDeparture(tailNumber, callSign);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    aircraftDeparture.setActualDepartureTimeMSecs(System.currentTimeMillis());
    aircraftDeparture.setDepartureAirportCode(departureAirportCode);
    aircraftDeparture.setDepartureRunway(departureRunwayName);

    // add the aircraft departure

    try {
      objectService.addDataObject(federationExecutionID, aircraftDeparture);
    } catch (MuthurException e) {
      fail(e.getLocalizedMessage());
    }

    assertObjectExists(aircraftDeparture);
  }