### Question:
ConnectionDecoratorFactoryResolver { public ConnectionDecoratorFactory resolve() { int loadingIndex = Integer.MIN_VALUE; ConnectionDecoratorFactory connectionDecoratorFactory = null; Iterator<ConnectionDecoratorFactoryService> connectionDecoratorFactoryServiceIterator = serviceLoader.iterator(); while (connectionDecoratorFactoryServiceIterator.hasNext()) { try { ConnectionDecoratorFactoryService connectionDecoratorFactoryService = connectionDecoratorFactoryServiceIterator.next(); int currentLoadingIndex = connectionDecoratorFactoryService.loadingIndex(); if (currentLoadingIndex > loadingIndex) { ConnectionDecoratorFactory currentConnectionDecoratorFactory = connectionDecoratorFactoryService.load(); if (currentConnectionDecoratorFactory != null) { connectionDecoratorFactory = currentConnectionDecoratorFactory; loadingIndex = currentLoadingIndex; } } } catch (LinkageError e) { LOGGER.info("Couldn't load ConnectionDecoratorFactoryService on the current JVM", e); } } if (connectionDecoratorFactory != null) { return connectionDecoratorFactory; } throw new IllegalStateException("No ConnectionDecoratorFactory could be loaded!"); } private  ConnectionDecoratorFactoryResolver(); ConnectionDecoratorFactory resolve(); static final ConnectionDecoratorFactoryResolver INSTANCE; }### Answer:
@Test public void testResolve() { ConnectionDecoratorFactory factory = ConnectionDecoratorFactoryResolver.INSTANCE.resolve(); assertEquals(getConnectionDecoratorFactoryClass(), factory.getClass()); }