Add self-tests