String[] gatewayBeans = m_appContext.getBeanNamesForType(Gateway.class); Map factoryIds = m_context.getFactoryIds(); assertEquals(gatewayBeans.length, factoryIds.size()); for (int i = 0; i < gatewayBeans.length; i++) { String beanName = gatewayBeans[i]; assertTrue(factoryIds.containsKey(beanName));
String[] gatewayModelBeansArray = m_appContext.getBeanNamesForType(PhoneModel.class); List gatewayModelBeans = Arrays.asList(gatewayModelBeansArray);  Collection models = m_context.getAvailableGatewayModels(); assertEquals(gatewayModelBeans.size(), models.size()); for (Iterator i = models.iterator(); i.hasNext();) { PhoneModel model = (PhoneModel) i.next(); String beanId = model.getBeanId(); gatewayModelBeans.contains(beanId);
    public void testGetFactoryIds() {        String[] gatewayBeans = m_appContext.getBeanNamesForType(Gateway.class);        Map factoryIds = m_context.getFactoryIds();        assertEquals(gatewayBeans.length, factoryIds.size());        for (int i = 0; i < gatewayBeans.length; i++) {            String beanName = gatewayBeans[i];            assertTrue(factoryIds.containsKey(beanName));        }    }