use of com.sequenceiq.distrox.api.v1.distrox.model.DistroXGenerateImageCatalogV1Response in project cloudbreak by hortonworks.
the class DistroXV1ControllerTest method testGenerateImageCatalog.
@Test
void testGenerateImageCatalog() {
CloudbreakImageCatalogV3 imageCatalog = Mockito.mock(CloudbreakImageCatalogV3.class);
when(workspaceService.getForCurrentUser()).thenReturn(workspace);
when(workspace.getId()).thenReturn(WORKSPACE_ID);
when(stackOperations.generateImageCatalog(nameOrCrnArgumentCaptor.capture(), Mockito.eq(WORKSPACE_ID))).thenReturn(imageCatalog);
DistroXGenerateImageCatalogV1Response actual = distroXV1Controller.generateImageCatalog(NAME);
assertEquals(NAME, nameOrCrnArgumentCaptor.getValue().getName());
assertEquals(imageCatalog, actual.getImageCatalog());
}
Aggregations