# Interpretation of the Mann-Whiteny U test [duplicate]

The straightforward null hypothesis for the Mann-Whitney U test is that the two distributions are identical. However, many documents (including Wikipedia) also indicate that it is equivalent for comparing the medians of two distributions.

Suppose that two distributions have the same shape, when the null hypothesis is violated, some shift in location exists between the two distributions. My question is that when there is a shift in location, not only median but also mean (and other distribution properties) are different between the two distributions. Why do we specifically say it is a test for median? Is it possible that when the null hypothesis is wrong, and still the means of the two distribution are the same?