public ActionManager getMockActionManager() {
    ActionManager actionManager = createMockBuilder(ActionManager.class).addMockedMethod(
        "getTasks").withConstructor(actionDBAccessor, injector.getInstance(RequestFactory.class),
            createNiceMock(ActionScheduler.class)).createMock();

    return actionManager;
  }
Gets an instance of the {@link ActionManager} with the
{@link ActionManager#getTasks(java.util.Collection)} method mocked.

@return
ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ActionManagerTestHelper.java