There is a presenter. Inside one of the methods, a Handler is created and launched, for the pending task.

public void myMethode() { ........... new Handler().postDelayed(new Runnable(){ run(){ ... } }, 2000 ) 

How to test run method? I get that he does not start in the test at all.

  • You can make the class non-anonymous and test its method as usual - Alex Chermenin
  • That is, make it also public? After all, otherwise there will be no access to it from outside, or I don’t understand something? - Helena2977
  • You can make it package-private - Alex Chermenin

0