{
fail();
}
};
_server.handleRequest(request, new RequestContext(), callback);
final StatusCollectionResource statusResource = getMockResource(StatusCollectionResource.class);
EasyMock.expect(statusResource.get(eq(1L))).andReturn(buildStatusRecord()).once();
EasyMock.replay(statusResource);
request = new RestRequestBuilder(new URI("/statuses/1/__debug/b")).build();
callback = new Callback<RestResponse>()
{
@Override
public void onSuccess(RestResponse restResponse)
{
assertEquals(restResponse.getStatus(), 200);
String responseString = restResponse.getEntity().asString(Charset.defaultCharset());
Assert.assertEquals(responseString, DEBUG_HANDLER_RESPONSE_B);
EasyMock.verify(statusResource);
EasyMock.reset(statusResource);
}
@Override
public void onError(Throwable e)
{
fail();
}
};
_server.handleRequest(request, new RequestContext(), callback);
}