Add AD test and libcat