}
@Test
public void testContextResolver()
{
ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance();
ContextResolver<String> resolver = factory.getContextResolver(String.class, MediaType.TEXT_PLAIN_TYPE);
Assert.assertEquals(resolver.getContext(int.class), "2");
Assert.assertEquals(resolver.getContext(float.class), "5");
resolver = factory.getContextResolver(String.class, MediaType.TEXT_XML_TYPE);
Assert.assertEquals(resolver.getContext(int.class), "3");
Assert.assertEquals(resolver.getContext(float.class), "6");
resolver = factory.getContextResolver(String.class, MediaType.APPLICATION_ATOM_XML_TYPE);
Assert.assertEquals(resolver.getContext(int.class), "1");
Assert.assertEquals(resolver.getContext(float.class), "4");
Assert.assertNull(resolver.getContext(double.class));
Assert.assertNull(factory.getContextResolver(Double.class, MediaType.APPLICATION_ATOM_XML_TYPE));
}