vehicles-api/src/test/java/com/udacity/vehicles/api/CarControllerTest.java
@Test
  public void findCar() throws Exception {
    mvc.perform(get("/cars/{id}", 1)
            .accept(MediaType.APPLICATION_JSON))
            .andExpect(jsonPath("id").value(1))
            .andExpect(jsonPath("details.body").value("sedan"))
            .andExpect(jsonPath("details.mileage").value(32280))
            .andExpect(status().isOk());
  }
/**
   * Tests the read operation for a single car by ID.
   *
   * @throws Exception if the read operation for a single car fails
   */
Tests the read operation for a single car by ID.
@throws Exception if the read operation for a single car fails
Tests the read operation for a single car by ID . @throws Exception if the read operation for a single car fails
@Test
  public void findCar() throws Exception {
    mvc.perform(get("/cars/{id}", 1)
            .accept(MediaType.APPLICATION_JSON))
            .andExpect(jsonPath("id").value(1))
            .andExpect(jsonPath("details.body").value("sedan"))
            .andExpect(jsonPath("details.mileage").value(32280))
            .andExpect(status().isOk());
  }
@ Test public void findCar ( ) throws Exception { mvc . perform ( get ( "/cars/{id}" , 1 ) . accept ( MediaType . APPLICATION_JSON ) ) . andExpect ( jsonPath ( "id" ) . value ( 1 ) ) . andExpect ( jsonPath ( "details.body" ) . value ( "sedan" ) ) . andExpect ( jsonPath ( "details.mileage" ) . value ( 32280 ) ) . andExpect ( status ( ) . isOk ( ) ) ; }
Tests the read operation for a single car by ID.
Tests the read operation for a single car by ID .