support for restart_policy and tests for restart_policy