}
@Test
public void localTest() throws Exception
{
ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
Assert.assertEquals(DateDelegate.class, factory.getHeaderDelegate(TestDate.class).getClass());
Assert.assertEquals(DateDelegate.class, factory.createHeaderDelegate(TestDate.class).getClass());
@SuppressWarnings("rawtypes")
SubDelegate<?> delegate = new SubDelegate();
factory.addHeaderDelegate(i1.class, delegate);
Assert.assertEquals(delegate, factory.getHeaderDelegate(i1.class));
Assert.assertEquals(delegate, factory.getHeaderDelegate(i2.class));
Assert.assertEquals(delegate, factory.getHeaderDelegate(i3.class));
Assert.assertEquals(delegate, factory.getHeaderDelegate(i4.class));
Assert.assertEquals(delegate, factory.getHeaderDelegate(TestDelegate.class));
Assert.assertEquals(delegate, factory.getHeaderDelegate(SubDelegate.class));
}