super.setup();
headers.put("server", "nginx/0.8.55");
headers.put("x-ratelimit-limit", "10000");
headers.put("x-ratelimit-remaining", "10000");
headers.put("x-ratelimit-cost", "5");
server.registerObjectFactory(new ObjectFactory(server) {
public Object newInstance(Class<?> aClass) {
m.setHeaders(headers);
return m;
}
public boolean canCreateInstanceOf(Class<?> aClass) {
return MockPushApi.class.isAssignableFrom(aClass);
}
});
server.registerObjectFactory(new ObjectFactory(server) {
public Object newInstance(Class<?> aClass) {
return pull;
}
public boolean canCreateInstanceOf(Class<?> aClass) {