ProjectService { public File getSpringXmlApplicationContextFile() { String contextFile = project.getSettings().getSpringApplicationContext(); if (contextFile.startsWith("classpath*:")) { contextFile = contextFile.substring("classpath*:".length()); } if (contextFile.startsWith("classpath:")) { contextFile = contextFile.substring("classpath:".length()); } return fileBrowserService.findFileInPath(new File(project.getProjectHome()), contextFile, true); }  @PostConstruct void loadDefaultProject(); Project load(String projectHomeDir); Project create(Repository repository); Project create(MavenArchetype archetype); File getSpringXmlApplicationContextFile(); File getSpringJavaConfigFile(); boolean hasSpringXmlApplicationContext(); boolean hasSpringJavaConfig(); void update(Project project); void saveProjectInfo(Project project); Properties getProjectProperties(); boolean validateProject(Project project); Project getActiveProject(); void closeActiveProject(); void setActiveProject(Project project); void addConnector(); void removeConnector(); List<Module> getModules(); void add(Module module); void remove(Module module); String getCloneDownloadUrl(Repository repository); void setFileBrowserService(FileBrowserService fileBrowserService); void setSpringBeanService(SpringBeanService springBeanService); void setSpringJavaConfigService(SpringJavaConfigService springJavaConfigService); void setEnvironment(Environment environment); String[] getRecentProjects(); void setProject(Project project);  }
@Test public void testGetSpringXmlApplicationContextFile() throws Exception { Project testProject = new Project(new ClassPathResource("projects/maven").getFile().getCanonicalPath()); projectService.setActiveProject(testProject); Assert.assertTrue(projectService.hasSpringXmlApplicationContext()); File configFile = projectService.getSpringXmlApplicationContextFile(); Assert.assertNotNull(configFile); Assert.assertTrue(configFile.exists()); Assert.assertEquals(configFile.getName(), "citrus-context.xml"); }