SpringBeanService { public <T> List<T> getBeanDefinitions(File configFile, Project project, Class<T> type) { return getBeanDefinitions(configFile, project, type, null); }  List<File> getConfigImports(File configFile, Project project); T getBeanDefinition(File configFile, Project project, String id, Class<T> type); List<T> getBeanDefinitions(File configFile, Project project, Class<T> type); List<T> getBeanDefinitions(File configFile, Project project, Class<T> type, Map<String, String> attributes); List<String> getBeanNames(File configFile, Project project, String beanType); void addBeanDefinition(File configFile, Project project, Object jaxbElement); void removeBeanDefinition(File configFile, Project project, String id); void removeBeanDefinitions(File configFile, Project project, Class<?> type); void removeBeanDefinitions(File configFile, Project project, Class<?> type, String attributeName, String attributeValue); void updateBeanDefinition(File configFile, Project project, String id, Object jaxbElement); void updateBeanDefinitions(File configFile, Project project, Class<?> type, Object jaxbElement); void updateBeanDefinitions(File configFile, Project project, Class<?> type, Object jaxbElement, String attributeName, String attributeValue); void setSpringBeanMarshaller(SpringBeanMarshaller springBeanMarshaller); static final String FAILED_TO_UPDATE_BEAN_DEFINITION; static final String UNABLE_TO_READ_TRANSFORMATION_SOURCE; }
@Test public void testGetBeanDefinitions() throws Exception { File tempFile = createTempContextFile("citrus-context-find"); List<SchemaModel> schemas = springBeanConfigService.getBeanDefinitions(tempFile, project, SchemaModel.class); Assert.assertEquals(schemas.size(), 2); Assert.assertEquals(schemas.get(0).getId(), "helloSchema"); Assert.assertEquals(schemas.get(0).getLocation(), "classpath:com/consol/citrus/demo/sayHello.xsd"); Assert.assertEquals(schemas.get(1).getId(), "helloSchemaExtended"); Assert.assertEquals(schemas.get(1).getLocation(), "classpath:com/consol/citrus/demo/sayHelloExtended.xsd"); }