RuntimeDelegate.setInstance(new TestRuntimeDelegate());
}
@Test
public void testProviders() throws Exception {
final ServiceLocator locator = Injections.createLocator(new ContextInjectionResolver.Binder(), new TestBinder(),
new MessagingBinders.MessageBodyProviders(null, RuntimeType.SERVER), new Binder());
TestBinder.initProviders(locator);
RequestScope scope = locator.getService(RequestScope.class);
scope.runInScope(new Callable<Object>() {
@Override
public Object call() throws Exception {
Providers instance = locator.getService(Providers.class);
assertNotNull(instance);
assertSame(JaxrsProviders.class, instance.getClass());
assertNotNull(instance.getExceptionMapper(Throwable.class));