@Test public void testGetApplicableImagesFiltersCurrentImage() throws CloudbreakImageCatalogException, CloudbreakImageNotFoundException { Stack stack = getStack(Status.AVAILABLE, Status.AVAILABLE); setupLoggedInUser(); when(imageCatalogService.getImages(anyLong(), anyString(), anyString())).thenReturn(getStatedImages()); when(stackService.getByNameInWorkspaceWithLists(eq(STACK_NAME), eq(ORG_ID))).thenReturn(Optional.ofNullable(stack)); when(stackImageUpdateService.isValidImage(any(), anyString(), anyString(), anyString())).thenReturn(true); when(componentConfigProviderService.getImage(anyLong())).thenReturn(getImage(IMAGE_HDP_ID)); Images images = underTest.getApplicableImages(ORG_ID, IMAGE_CATALOG_NAME, STACK_NAME); assertEquals(IMAGE_BASE_ID, images.getBaseImages().get(0).getUuid()); verify(imageCatalogService).getImages(eq(ORG_ID), eq(IMAGE_CATALOG_NAME), eq(PROVIDER_AWS)); verify(componentConfigProviderService).getImage(STACK_ID); verify(stackImageUpdateService).isValidImage(eq(stack), eq(IMAGE_BASE_ID), eq(IMAGE_CATALOG_NAME), eq(CUSTOM_IMAGE_CATALOG_URL)); verify(stackImageUpdateService, never()).isValidImage(eq(stack), eq(IMAGE_HDP_ID), eq(IMAGE_CATALOG_NAME), eq(CUSTOM_IMAGE_CATALOG_URL)); verify(stackImageUpdateService, never()).isValidImage(eq(stack), eq(IMAGE_HDF_ID), eq(IMAGE_CATALOG_NAME), eq(CUSTOM_IMAGE_CATALOG_URL)); }
public Images getApplicableImages(Long workspaceId, String stackName) throws CloudbreakImageCatalogException { return getApplicableImages(workspaceId, CDP_DEFAULT_CATALOG_NAME, stackName); }
StackImageFilterService { public Images getApplicableImages(Long workspaceId, String stackName) throws CloudbreakImageCatalogException { return getApplicableImages(workspaceId, CDP_DEFAULT_CATALOG_NAME, stackName); } }
StackImageFilterService { public Images getApplicableImages(Long workspaceId, String stackName) throws CloudbreakImageCatalogException { return getApplicableImages(workspaceId, CDP_DEFAULT_CATALOG_NAME, stackName); }  }
StackImageFilterService { public Images getApplicableImages(Long workspaceId, String stackName) throws CloudbreakImageCatalogException { return getApplicableImages(workspaceId, CDP_DEFAULT_CATALOG_NAME, stackName); }  Images getApplicableImages(Long workspaceId, String stackName); Images getApplicableImages(Long workspaceId, String imageCatalogName, String stackName); }
StackImageFilterService { public Images getApplicableImages(Long workspaceId, String stackName) throws CloudbreakImageCatalogException { return getApplicableImages(workspaceId, CDP_DEFAULT_CATALOG_NAME, stackName); }  Images getApplicableImages(Long workspaceId, String stackName); Images getApplicableImages(Long workspaceId, String imageCatalogName, String stackName);  }