Generalizing last master activity test