@Test
/*
 Test to validate execute method. This is a variant of above method, where heartbeat is
 produced after an initial delay. This delay causes PostRestoreHook to terminate the child
 process since there is no heartbeat multiple times, and eventually once the heartbeat starts,
 PostRestoreHook waits for the child process to complete execution. Test fails in case of any
 exception.
*/
public void testPostRestoreHookExecuteHeartBeatDelay() throws Exception {

    Injector inject = Guice.createInjector(new TestModule());
    IPostRestoreHook postRestoreHook = inject.getInstance(IPostRestoreHook.class);
    IConfiguration configuration = inject.getInstance(IConfiguration.class);
    startHeartBeatThreadWithDelay(
            1000,
            configuration.getPostRestoreHookHeartbeatFileName(),
            configuration.getPostRestoreHookDoneFileName());
    postRestoreHook.execute();
}