'How to write junit for void method call of same class in junit?

How to cover below m2() method? In pit report mutant is still there. I searched it is suggest me to use spy for this kind of problem, but I don't know which case it is using.

Class Data{
  void M1(){
    M2();           //this one I have to test.. 
  }
  void M2(){
    // Some logic here
  }
}

I have to test M2 method call which is in M1 method. mutant is still there. I want to kill that mutant for same line. I didn't get how to cover that part. I am new to this junit.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source