@Test public void testPopulateJobConfigFails() throws Exception { IJobConfiguration job = IJobConfiguration.build(makeJob(null)); control.replay(); assertResponse(INVALID_REQUEST, thrift.populateJobConfig(job.newBuilder())); }
@Test public void testPopulateJobConfig() throws Exception { IJobConfiguration job = IJobConfiguration.build(makeJob()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(TaskTestUtil.CONFIGURATION_MANAGER, job); control.replay(); Response response = assertOkResponse(thrift.populateJobConfig(job.newBuilder())); assertEquals( Result.populateJobResult( new PopulateJobResult(sanitized.getJobConfig().getTaskConfig().newBuilder())), response.getResult()); }