As in the topic, how does it work / how much mana will you gain, having Mind over Matter? 

Details about the question:

 - An example for "X % of Damage taken Gained as Mana when Hit": Unique
   **Mindspiral** http://pathofexile.gamepedia.com/Mindspiral abbreviated: **%DtM**
 - **Mind over Matter** is a Keystone and grants: "When Hit, 30 % of Damage is taken from Mana before Life":  http://pathofexile.gamepedia.com/Mind_Over_Matter abbreviated **MoM**

To find the answer, the question is also: Which is calculated first %DtM or MoM?

Simple Example:

 - 100 incoming damage and we have no mitigation
 - We have 10 % DtM
 - We have MoM

There are 2 general possibilities which I see:

 1. **%DtM** first: 100 damage gets you *10 mana* first, then deals 70 damage to life and costs 30
    mana
 2. **MoM** first: 100 damage deals 70 damage to life and costs 30 mana, first. This results
    in *7 mana* gained (10% of 70 damage to life)