@Test public void newOperator() throws IOException { Map<String, Object> configInput = ImmutableMap.of( "query", "select * from users", "to", "s3: ); TaskRequest taskRequest = testHelper.createTaskRequest(configInput, Optional.absent()); OperatorContext operatorContext = mock(OperatorContext.class); when(operatorContext.getProjectPath()).thenReturn(testHelper.projectPath()); when(operatorContext.getTaskRequest()).thenReturn(taskRequest); RedshiftUnloadOperatorFactory.RedshiftUnloadOperator operator = (RedshiftUnloadOperatorFactory.RedshiftUnloadOperator) operatorFactory.newOperator(operatorContext); assertThat(operator, is(instanceOf(RedshiftUnloadOperatorFactory.RedshiftUnloadOperator.class))); }
@Override public Operator newOperator(OperatorContext context) { return new RedshiftUnloadOperator(systemConfig, context, templateEngine); }
RedshiftUnloadOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new RedshiftUnloadOperator(systemConfig, context, templateEngine); } }
RedshiftUnloadOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new RedshiftUnloadOperator(systemConfig, context, templateEngine); } @Inject  RedshiftUnloadOperatorFactory(Config systemConfig, TemplateEngine templateEngine); }
RedshiftUnloadOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new RedshiftUnloadOperator(systemConfig, context, templateEngine); } @Inject  RedshiftUnloadOperatorFactory(Config systemConfig, TemplateEngine templateEngine); @Override String getType(); @Override Operator newOperator(OperatorContext context); }
RedshiftUnloadOperatorFactory implements OperatorFactory { @Override public Operator newOperator(OperatorContext context) { return new RedshiftUnloadOperator(systemConfig, context, templateEngine); } @Inject  RedshiftUnloadOperatorFactory(Config systemConfig, TemplateEngine templateEngine); @Override String getType(); @Override Operator newOperator(OperatorContext context);  }