use of io.confluent.ksql.execution.runtime.RuntimeBuildContext in project ksql by confluentinc.
the class ForeignKeyTableTableJoinBuilderTest method init.
@SuppressWarnings("unchecked")
@Before
public void init() {
when(left.build(any(), eq(planInfo))).thenReturn(KTableHolder.materialized(leftKTable, LEFT_SCHEMA, executionKeyFactory, materializationBuilder));
when(leftMultiKey.build(any(), eq(planInfo))).thenReturn(KTableHolder.materialized(leftKTableMultiKey, LEFT_SCHEMA_MULTI_KEY, executionKeyFactory, materializationBuilder));
when(right.build(any(), eq(planInfo))).thenReturn(KTableHolder.materialized(rightKTable, RIGHT_SCHEMA, executionKeyFactory, materializationBuilder));
when(leftKTable.leftJoin(any(KTable.class), any(KsqlKeyExtractor.class), any(), any(Materialized.class))).thenReturn(resultKTable);
when(leftKTable.join(any(KTable.class), any(KsqlKeyExtractor.class), any(), any(Materialized.class))).thenReturn(resultKTable);
when(leftKTableMultiKey.leftJoin(any(KTable.class), any(KsqlKeyExtractor.class), any(), any(Materialized.class))).thenReturn(resultKTable);
when(leftKTableMultiKey.join(any(KTable.class), any(KsqlKeyExtractor.class), any(), any(Materialized.class))).thenReturn(resultKTable);
when(formats.getKeyFeatures()).thenReturn(mock(SerdeFeatures.class));
when(formats.getValueFeatures()).thenReturn(mock(SerdeFeatures.class));
final RuntimeBuildContext context = mock(RuntimeBuildContext.class);
when((context.getFunctionRegistry())).thenReturn(mock(FunctionRegistry.class));
when((context.getKsqlConfig())).thenReturn(mock(KsqlConfig.class));
planBuilder = new KSPlanBuilder(context, mock(SqlPredicateFactory.class), mock(AggregateParamsFactory.class), mock(StreamsFactories.class));
}
Aggregations