use of org.apache.samza.task.MockStreamTask in project samza by apache.
the class TestApplicationUtil method testTaskClassOnly.
@Test
public void testTaskClassOnly() {
Map<String, String> configMap = new HashMap<>();
configMap.put(TaskConfig.TASK_CLASS, MockStreamTask.class.getName());
Config config = new MapConfig(configMap);
SamzaApplication app = ApplicationUtil.fromConfig(config);
assertTrue(app instanceof TaskApplication);
TaskApplicationDescriptorImpl appSpec = new TaskApplicationDescriptorImpl((TaskApplication) app, config);
assertTrue(appSpec.getTaskFactory().createInstance() instanceof MockStreamTask);
}
Aggregations