void () { JpsEncodingConfigurationService service = JpsEncodingConfigurationService.getInstance(); assertEquals("UTF-8", service.getProjectEncoding(myModel)); JpsEncodingProjectConfiguration configuration = service.getEncodingConfiguration(myProject); assertNotNull(configuration); assertEquals("UTF-8", configuration.getProjectEncoding()); assertEquals("windows-1251", configuration.getEncoding(new File(getAbsolutePath("util")))); assertEquals("windows-1251", configuration.getEncoding(new File(getAbsolutePath("util/foo/bar/file.txt")))); assertEquals("UTF-8", configuration.getEncoding(new File(getAbsolutePath("other")))); }