ResourceConfig { public Class<? extends ResourceProvider> getProviderClass(ClassLoader cl) throws ClassNotFoundException { if (providerClass == null) { providerClass = cl.loadClass(provider).asSubclass(ResourceProvider.class); } return providerClass; }  String getName(); String getPluralName(); String getIdProperty(); List<String> getSubResourceNames(); String getProvider(); String getService(); String getResource(); Class<? extends ResourceProvider> getProviderClass(ClassLoader cl); Class<?> getServiceClass(ClassLoader cl); Class<?> getResourceClass(ClassLoader cl); boolean isExternal(); static final String EXTERNAL_RESOURCE_PLURAL_NAME; }
@Test public void testGetProviderClass() throws Exception { List<ResourceConfig> resourceConfigs = getResourceConfigs(); Assert.assertEquals(2, resourceConfigs.size()); Assert.assertTrue(resourceConfigs.get(0).getProviderClass(getClass().getClassLoader()).equals(ViewConfigTest.MyResourceProvider.class)); Assert.assertTrue(resourceConfigs.get(1).getProviderClass(getClass().getClassLoader()).equals(ViewConfigTest.MyResourceProvider.class)); }