Rank tests of maximal power against Lehmann-type alternatives