// no cache and no factories yet
assertNotNull("AdapterFactoryDescriptors must not be null", am.getFactories());
assertTrue("AdapterFactoryDescriptors must be empty", am.getFactories().isEmpty());
assertNull("AdapterFactory cache must be null", am.getFactoryCache());
Bundle bundle = new MockBundle(1L);
MockServiceReference ref = new MockServiceReference(bundle);
ref.setProperty(Constants.SERVICE_ID, 1L);
ref.setProperty(AdapterFactory.ADAPTABLE_CLASSES, new String[]{ TestSlingAdaptable.class.getName() });
ref.setProperty(AdapterFactory.ADAPTER_CLASSES, ITestAdapter.class.getName());
am.bindAdapterFactory(ref);