public static void f(int i) throws Exception1, Exception2, Exception3 {
        if(i == 1) {
            throw new Exception1("Exception1");
        } else if(i == 2) {
            throw new Exception2("Exception2");
        } else if(i == 3) {
            throw new Exception3("Exception3");
        } else if(i == 4) {
            throw new NullPointerException();
        }
    }