BGP route-selection in Junos.

Junos evaluates and determines the most preferred BGP route according to this rather self-explanatory list;

scenario