public void testTimerInterceptor() throws Exception
{
log.info("starting testTimerInterceptor()");
// Schedule timer.
ResteasyClient client = new ResteasyClientBuilder().build();
Invocation.Builder request = client.target("http://localhost:8080/RESTEASY-1008/rest/timer/schedule").request();
Response response = request.get();
log.info("Status: " + response.getStatus());
assertEquals(200, response.getStatus());
// Verify timer expired and timer interceptor was executed.
client = new ResteasyClientBuilder().build();
request = client.target("http://localhost:8080/RESTEASY-1008/rest/timer/test").request();
response = request.get();
log.info("Status: " + response.getStatus());
assertEquals(200, response.getStatus());
}