Testing the prolog rules