@Test
public void testIgnoringWindowsReservedFilenames() {

    File tempDir = Files.createTempDir();
    ClassFileNameHandler handler = new ClassFileNameHandler(tempDir, ".smali", true, false);
    File file = handler.getUniqueFilenameForClass("La/con/c;");
    checkFilename(tempDir, file, "a", "con", "c.smali");
    file = handler.getUniqueFilenameForClass("La/Con/c;");
    checkFilename(tempDir, file, "a", "Con", "c.smali");
    file = handler.getUniqueFilenameForClass("La/b/PRN;");
    checkFilename(tempDir, file, "a", "b", "PRN.smali");
    file = handler.getUniqueFilenameForClass("La/b/prN;");
    checkFilename(tempDir, file, "a", "b", "prN.smali");
    file = handler.getUniqueFilenameForClass("La/b/com0;");
    checkFilename(tempDir, file, "a", "b", "com0.smali");
    for (String reservedName: new String[] {"con", "prn", "aux", "nul", "com1", "com9", "lpt1", "lpt9"}) {
        file = handler.getUniqueFilenameForClass("L" + reservedName + ";");
        checkFilename(tempDir, file, reservedName +".smali");
    }
}