fix test case for KyloCatalogClientBuilder mock
@@ -20,6 +20,7 @@ package com.thinkbiganalytics.spark.service;
* #L%
*/
+import com.thinkbiganalytics.kylo.catalog.api.KyloCatalogClientBuilder;
import com.thinkbiganalytics.spark.DataSet;
import com.thinkbiganalytics.spark.SparkContextService;
import com.thinkbiganalytics.spark.dataprofiler.Profiler;
@@ -75,7 +76,7 @@ public class TransformServiceTest {
request.setDoProfile(true);
request.setScript("sqlContext.range(1,10)");
- final TransformService service = new TransformService(TransformScript.class, engine, sparkContextService, new MockJobTrackerService(), Mockito.mock(DataSetConverterService.class));
+ final TransformService service = new TransformService(TransformScript.class, engine, sparkContextService, new MockJobTrackerService(), Mockito.mock(DataSetConverterService.class), Mockito.mock(KyloCatalogClientBuilder.class));
final TransformResponse response = service.execute(request);
Assert.assertEquals(TransformResponse.Status.PENDING, response.getStatus());
@@ -136,7 +137,7 @@ public class TransformServiceTest {
request.setDatasources(Collections.singletonList(Mockito.mock(Datasource.class)));
request.setScript("sqlContext.range(1,10)");
- final TransformService service = new TransformService(TransformScript.class, engine, sparkContextService, new MockJobTrackerService(), Mockito.mock(DataSetConverterService.class));
+ final TransformService service = new TransformService(TransformScript.class, engine, sparkContextService, new MockJobTrackerService(), Mockito.mock(DataSetConverterService.class),Mockito.mock(KyloCatalogClientBuilder.class));
service.setDatasourceProviderFactory(datasourceProviderFactory);
service.setProfiler(profiler);
@@ -176,7 +177,7 @@ public class TransformServiceTest {
// Test converting request to script
final TransformService service = new TransformService(TransformScript.class, Mockito.mock(SparkScriptEngine.class), Mockito.mock(SparkContextService.class),
- Mockito.mock(JobTrackerService.class), Mockito.mock(DataSetConverterService.class));
+ Mockito.mock(JobTrackerService.class), Mockito.mock(DataSetConverterService.class),Mockito.mock(KyloCatalogClientBuilder.class));
InputStream inputStream = getClass().getResourceAsStream("transform-service-script1.scala");
final String expected = IOUtils.toString(inputStream, "UTF-8");
@@ -200,7 +201,7 @@ public class TransformServiceTest {
// Test converting request to script
final TransformService service = new TransformService(TransformScript.class, Mockito.mock(SparkScriptEngine.class), Mockito.mock(SparkContextService.class),
- Mockito.mock(JobTrackerService.class), Mockito.mock(DataSetConverterService.class));
+ Mockito.mock(JobTrackerService.class), Mockito.mock(DataSetConverterService.class),Mockito.mock(KyloCatalogClientBuilder.class));
InputStream inputStream = getClass().getResourceAsStream("transform-service-script2.scala");
final String expected = IOUtils.toString(inputStream, "UTF-8");
