@Test
public void testBasicFunctionality() {

    File tempDir = Files.createTempDir();
    ClassFileNameHandler handler = new ClassFileNameHandler(tempDir, ".smali");
    File file = handler.getUniqueFilenameForClass("La/b/c/d;");
    checkFilename(tempDir, file, "a", "b", "c", "d.smali");
    file = handler.getUniqueFilenameForClass("La/b/c/e;");
    checkFilename(tempDir, file, "a", "b", "c", "e.smali");
    file = handler.getUniqueFilenameForClass("La/b/d/d;");
    checkFilename(tempDir, file, "a", "b", "d", "d.smali");
    file = handler.getUniqueFilenameForClass("La/b;");
    checkFilename(tempDir, file, "a", "b.smali");
    file = handler.getUniqueFilenameForClass("Lb;");
    checkFilename(tempDir, file, "b.smali");
}