@Test
public void testCreateJobGraphForLegacyTaskApplication() {
TaskApplicationDescriptorImpl taskAppDesc = mock(TaskApplicationDescriptorImpl.class);
when(taskAppDesc.getInputDescriptors()).thenReturn(new HashMap<>());
when(taskAppDesc.getOutputDescriptors()).thenReturn(new HashMap<>());
when(taskAppDesc.getTableDescriptors()).thenReturn(new HashSet<>());
when(taskAppDesc.getSystemDescriptors()).thenReturn(new HashSet<>());
when(taskAppDesc.getIntermediateBroadcastStreamIds()).thenReturn(new HashSet<>());
doReturn(LegacyTaskApplication.class).when(taskAppDesc).getAppClass();
Map<String, String> systemStreamConfigs = new HashMap<>();
inputDescriptors.forEach((key, value) -> systemStreamConfigs.putAll(value.toConfig()));
outputDescriptors.forEach((key, value) -> systemStreamConfigs.putAll(value.toConfig()));
systemDescriptors.forEach(sd -> systemStreamConfigs.putAll(sd.toConfig()));
ExecutionPlanner planner = new ExecutionPlanner(config, streamManager);
JobGraph jobGraph = planner.createJobGraph(taskAppDesc);
assertEquals(1, jobGraph.getJobNodes().size());
JobNode jobNode = jobGraph.getJobNodes().get(0);
assertEquals("test-app", jobNode.getJobName());
assertEquals("test-app-1", jobNode.getJobNameAndId());
assertEquals(0, jobNode.getInEdges().size());
assertEquals(0, jobNode.getOutEdges().size());
assertEquals(0, jobNode.getTables().size());
assertEquals(config, jobNode.getConfig());
}