I'm not white sure what you mean by your question, could you clarify? What is it you're trying to do and what error do you get?
However, a few things I do notice:
* Are you sure that is EasyMock? It looks identical to
Mockito to me.
* Your scheduler() method is not easily testable. It takes no parameters and creates its own variables. You can't mock the Runnable it is using because you aren't using dependency injection.
* The scheduler() creates an infinite loop that does nothing but repeatedly call the scheduler() method. What is there to test?