When you need to poll an asynchronous service more than once you can use the
annotation. A simple example looks like the one below. The service in this example will be called
5 times as the same as the test method. The response for each request will be injected into the
test object and can be tested.
To use a callback to test an asynchronous service you can use the
on you test method. Restfuse will start a server on the defined port and registers a resource. The
test fails if the attached resource was not called. Within the resource you can test the incoming
request. A simple callback example looks like this.