SpringJavaConfigService { public List<Class<?>> getConfigImports(Class<?> configFile, Project project) { Import importAnnotation = configFile.getAnnotation(Import.class); if (importAnnotation != null) { return Arrays.asList(importAnnotation.value()); } return new ArrayList<>(); }  List<Class<?>> getConfigImports(Class<?> configFile, Project project); T getBeanDefinition(Class<?> configFile, Project project, String id, Class<T> type); List<T> getBeanDefinitions(Class<?> configFile, Project project, Class<T> type); List<String> getBeanNames(Class<?> configFile, Project project, Class<?> type); void addBeanDefinition(File configFile, Project project, Object model); void removeBeanDefinition(File configFile, Project project, String id); void removeBeanDefinitions(File configFile, Project project, Class<?> type); void updateBeanDefinition(File configFile, Project project, String id, Object model); void updateBeanDefinitions(File configFile, Project project, Class<?> type, Object model);  }
@Test public void testImports() throws Exception { List<Class<?>> imports = springJavaConfigService.getConfigImports(ImportConfig.class, project); Assert.assertEquals(imports.size(), 1L); Assert.assertEquals(imports.get(0), ChildConfig.class); }