Code example for ProxyFactory

0
	 */ 
	@Test
	public void considersJdkProxiedOrderedImplementation() { 
 
		ThirdImplementation plugin = new ThirdImplementation();
		TestPlugin thirdPlugin = (TestPlugin) new ProxyFactory(plugin).getProxy();
 
		OrderAwarePluginRegistry<TestPlugin, String> registry = create(Arrays
				.asList(firstPlugin, secondPlugin, thirdPlugin));
		assertOrder(registry, secondPlugin, thirdPlugin, firstPlugin);
		assertOrder(registry.reverse(), firstPlugin, thirdPlugin, secondPlugin);
	} 
 
	@Test
	public void defaultSetupUsesDefaultComparator() { 
		assertDefaultComparator(OrderAwarePluginRegistry.<String, TestPlugin> create());
	} 
 
	@Test
	public void defaultSetupUsesDefaultReverseComparator() { 
Experience pair programming with AI  Get Codota for Java