}
@Test
public void testCarResource() throws Exception
{
ResteasyClient client = new ResteasyClientBuilder().build();
System.out.println("**** Via @MatrixParam ***");
Invocation.Builder request = client.target(TestPortProvider.generateURL("/cars/mercedes/matrixparam/e55;color=black/2006")).request();
Response response = request.get();
Assert.assertEquals(200, response.getStatus());
Assert.assertEquals("A black 2006 mercedes e55", response.readEntity(String.class));
// This must be a typo. Should be "A midnight blue 2006 Porsche 911 Carrera S".
System.out.println("**** Via PathSegment ***");
request = client.target(TestPortProvider.generateURL("/cars/mercedes/pathsegment/e55;color=black/2006")).request();
response = request.get();
Assert.assertEquals(200, response.getStatus());
Assert.assertEquals("A black 2006 mercedes e55", response.readEntity(String.class));
System.out.println("**** Via PathSegments ***");
request = client.target(TestPortProvider.generateURL("/cars/mercedes/pathsegments/e55/amg/year/2006")).request();
response = request.get();
Assert.assertEquals(200, response.getStatus());
Assert.assertEquals("A 2006 mercedes e55 amg", response.readEntity(String.class));
System.out.println("**** Via PathSegment ***");
request = client.target(TestPortProvider.generateURL("/cars/mercedes/uriinfo/e55;color=black/2006")).request();
response = request.get();
Assert.assertEquals(200, response.getStatus());
Assert.assertEquals("A black 2006 mercedes e55", response.readEntity(String.class));
client.close();
}