void (String[] shortFileName,String[][] expectedFileNames) { final List<VirtualFile> files = new ArrayList<>(shortFileName.length); for(String s: shortFileName) { if (FileUtilRt.getExtension(s).length() < 3) { s += ".xsd"; } files.add(getVirtualFile( getBasePath() + "/"+ s )); } int fileIndex = 0; for (int i = 0; i < expectedFileNames.length; i++) { String[] expectedFileNameArray = expectedFileNames[i]; Set<String> strings = FetchExtResourceAction.extractEmbeddedFileReferences( files.get(fileIndex), fileIndex != 0 ? files.get(0) : null, getPsiManager(), shortFileName[i]); assertEquals(expectedFileNameArray.length, strings.size()); int index = 0; for (final String string : strings) { assertEquals(expectedFileNameArray[index], string); ++index; } fileIndex++; } }