Extend and improve tests