@Test
public void testFitStreamTable() {

    Long id = MLEnvironmentFactory.getNewMLEnvironmentId();
    MLEnvironment env = MLEnvironmentFactory.get(id);
    DataStream<Integer> input= env.getStreamExecutionEnvironment().fromElements(1, 2, 3);
    Table table = env.getStreamTableEnvironment().fromDataStream(input);
    FakeEstimator estimator = new FakeEstimator();
    estimator.setMLEnvironmentId(id);
    estimator.fit(env.getStreamTableEnvironment(), table);
    Assert.assertFalse(estimator.batchFitted);
    Assert.assertTrue(estimator.streamFitted);
}