### Question:
ScheduleTaskRunner { @VisibleForTesting static Map<String, String> getUserArgs(ProgramSchedule schedule, PropertiesResolver propertiesResolver) throws IOException, NotFoundException { Map<String, String> userArgs = new HashMap<>(); userArgs.putAll(propertiesResolver.getUserProperties(schedule.getProgramId())); userArgs.putAll(schedule.getProperties()); return userArgs; } ScheduleTaskRunner(Store store, ProgramLifecycleService lifecycleService,
                            PropertiesResolver propertiesResolver,
                            NamespaceQueryAdmin namespaceQueryAdmin, CConfiguration cConf); void launch(Job job); void execute(ProgramId id, Map<String, String> sysArgs, Map<String, String> userArgs);  }### Answer:
@Test public void testRuntimeArgumentResolution() throws Exception { Injector injector = Guice.createInjector( new ConfigModule(), binder -> { binder.bind(OwnerAdmin.class).to(NoOpOwnerAdmin.class); binder.bind(NamespaceAdmin.class).to(InMemoryNamespaceAdmin.class); binder.bind(NamespaceQueryAdmin.class).to(InMemoryNamespaceAdmin.class); binder.bind(PreferencesFetcher.class) .toInstance(new FakePreferencesFetcher(Collections.singletonMap("key", "should-be-overridden"))); }); PropertiesResolver propertiesResolver = injector.getInstance(PropertiesResolver.class); ApplicationId appId = NamespaceId.DEFAULT.app("app"); ProgramSchedule programSchedule = new ProgramSchedule( "schedule", "desc", appId.workflow("wf2"), Collections.singletonMap("key", "val"), new ProgramStatusTrigger(appId.workflow("wf1")), Collections.emptyList()); Map<String, String> userArgs = ScheduleTaskRunner.getUserArgs(programSchedule, propertiesResolver); Assert.assertEquals("val", userArgs.get("key")); }