use of io.hops.hopsworks.common.featurestore.featuregroup.cached.FeatureGroupCommitController in project hopsworks by logicalclocks.
the class TestCommitBuilder method setup.
@Before
public void setup() {
featureGroupCommitController = Mockito.mock(FeatureGroupCommitController.class);
Mockito.when(featureGroupCommitController.getCommitDetails(Mockito.anyInt(), Mockito.anyInt(), Mockito.anyInt(), Mockito.anySet(), Mockito.anySet())).thenReturn(new AbstractFacade.CollectionInfo(0L, new ArrayList()));
// throws exception if limit or offset is null
Mockito.when(featureGroupCommitController.getCommitDetails(Mockito.anyInt(), Mockito.anyInt(), Mockito.isNull(), Mockito.anySet(), Mockito.anySet())).thenThrow(new NullPointerException());
Mockito.when(featureGroupCommitController.getCommitDetails(Mockito.anyInt(), Mockito.isNull(), Mockito.anyInt(), Mockito.anySet(), Mockito.anySet())).thenThrow(new NullPointerException());
commitBuilder = new CommitBuilder(featureGroupCommitController);
mockUriInfo = Mockito.mock(UriInfo.class);
UriBuilder mockUriBuilder = Mockito.mock(UriBuilder.class);
Mockito.when(mockUriBuilder.path(Mockito.anyString())).thenReturn(mockUriBuilder);
Mockito.when(mockUriInfo.getBaseUriBuilder()).thenReturn(mockUriBuilder);
featuregroup = new Featuregroup();
featuregroup.setId(0);
Featurestore featurestore = new Featurestore();
featurestore.setId(0);
featuregroup.setFeaturestore(featurestore);
project = new Project();
project.setId(0);
}
Aggregations