vehicles-api/src/test/java/com/udacity/vehicles/api/CarControllerTest.java
@Test
  public void updateCar() throws Exception {
    // get the car object and update it.
    Car car = getCar();
    car.getDetails().setMileage(100);
    car.setCondition(Condition.NEW);

    mvc.perform(put("/cars/{id}",1)
            .contentType(MediaType.APPLICATION_JSON)
            .content(json.write(car).getJson())
            .accept(MediaType.APPLICATION_JSON_UTF8))
            .andExpect(status().isOk());
  }
/**
   * Tests the update of a car.
   *
   * @throws Exception
   */
Tests the update of a car.
@throws Exception
Tests the update of a car . @throws Exception
@Test
  public void updateCar() throws Exception {
    Car car = getCar();
    car.getDetails().setMileage(100);
    car.setCondition(Condition.NEW);
    mvc.perform(put("/cars/{id}",1)
            .contentType(MediaType.APPLICATION_JSON)
            .content(json.write(car).getJson())
            .accept(MediaType.APPLICATION_JSON_UTF8))
            .andExpect(status().isOk());
  }
@ Test public void updateCar ( ) throws Exception { Car car = getCar ( ) ; car . getDetails ( ) . setMileage ( 100 ) ; car . setCondition ( Condition . NEW ) ; mvc . perform ( put ( "/cars/{id}" , 1 ) . contentType ( MediaType . APPLICATION_JSON ) . content ( json . write ( car ) . getJson ( ) ) . accept ( MediaType . APPLICATION_JSON_UTF8 ) ) . andExpect ( status ( ) . isOk ( ) ) ; }
Tests the update of a car.
Tests the update of a car .
// get the car object and update it.