How molecular mechanisms of resistance affect resistance evolution