Obedient dog passes near impossible loyalty test