@Test
public void testAltServiceLoaderLoadUnprocessed() throws Exception {

    Bundle spiFlyBundle = mockSpiFlyBundle();
    Dictionary<String, String> headers = new Hashtable<String, String>();
    headers.put(SpiFlyConstants.SPI_CONSUMER_HEADER, "*");
    Bundle consumerBundle = mockConsumerBundle(headers, spiFlyBundle);
    WeavingHook wh = new ClientWeavingHook(spiFlyBundle.getBundleContext(), activator);
    // Weave the TestClient class.
    URL clsUrl = getClass().getResource("UnaffectedTestClient.class");
    Assert.assertNotNull("Precondition", clsUrl);
    WovenClass wc = new MyWovenClass(clsUrl, "org.apache.aries.spifly.dynamic.UnaffectedTestClient", consumerBundle);
    Assert.assertEquals("Precondition", 0, wc.getDynamicImports().size());
    wh.weave(wc);
    Assert.assertEquals("The client is not affected so no additional imports should have been added",
        0, wc.getDynamicImports().size());
    // ok the weaving is done, now prepare the registry for the call
    Bundle providerBundle = mockProviderBundle("impl1", 1);
    activator.registerProviderBundle("org.apache.aries.mytest.MySPI", providerBundle, new HashMap<String, Object>());
    // Invoke the woven class and check that it propertly sets the TCCL so that the
    // META-INF/services/org.apache.aries.mytest.MySPI file from impl1 is visible.
    Class<?> cls = wc.getDefinedClass();
    Method method = cls.getMethod("test", new Class [] {String.class});
    Object result = method.invoke(cls.newInstance(), "hello");
    Assert.assertEquals("impl4", result);
}