GWTMockUtilities.restore();
}
public void test() throws Exception{
// setup a method, a builder and a filter-aware callback
Method method = EasyMock.createMock(Method.class);
RequestBuilder builder = EasyMock.createMock(RequestBuilder.class);
RequestCallback rc = new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
}
@Override
public void onError(Request request, Throwable exception) {
throw new RuntimeException(exception);
}
};
EasyMock.expect(builder.getCallback()).andReturn(rc);
EasyMock.replay(builder);
method.builder = builder;
EasyMock.expect(method.isExpected(200)).andReturn(true);
EasyMock.replay(method);
FilterawareRequestCallback callback = new DefaultFilterawareRequestCallback(method);
// set the response code