}
}
public void testAsyncCallWithListener() throws Exception {
IRemoteService restClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registration.getReference());
restClientService.callAsync(RestCallFactory.createRestCall(IUserTimeline.class.getName() + ".getUserStatuses"), new IRemoteCallListener() {
public void handleEvent(IRemoteCallEvent event) {
if (event instanceof IRemoteCallCompleteEvent) {
IRemoteCallCompleteEvent cce = (IRemoteCallCompleteEvent) event;
Object response = cce.getResponse();
assertTrue(response instanceof IUserStatus[]);