@Test public void testHttpImageCatalogValid() throws CloudbreakImageCatalogException, IOException { String path = getPath(CB_IMAGE_CATALOG_VALID_JSON); String catalogUrl = "http"; when(clientMock.target(catalogUrl)).thenReturn(webTargetMock); when(webTargetMock.request()).thenReturn(builderMock); when(builderMock.get()).thenReturn(responseMock); when(responseMock.getStatusInfo()).thenReturn(statusTypeMock); when(statusTypeMock.getFamily()).thenReturn(Family.SUCCESSFUL); when(responseMock.readEntity(String.class)).thenReturn(FileUtils.readFileToString(Paths.get(path, CB_IMAGE_CATALOG_V2_JSON).toFile())); ReflectionTestUtils.setField(underTest, "etcConfigDir", path); ReflectionTestUtils.setField(underTest, "enabledLinuxTypes", Collections.emptyList()); CloudbreakImageCatalogV3 actualCatalog = underTest.getImageCatalogV3(catalogUrl); CloudbreakImageCatalogV3 expectedCatalog = objectMapper.readValue(Paths.get(path, CB_IMAGE_CATALOG_V2_JSON).toFile(), CloudbreakImageCatalogV3.class); assertEquals(mapToUuid(expectedCatalog.getImages().getBaseImages()), mapToUuid(actualCatalog.getImages().getBaseImages())); assertEquals(mapToUuid(expectedCatalog.getImages().getCdhImages()), mapToUuid(actualCatalog.getImages().getCdhImages())); }
public CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl) throws CloudbreakImageCatalogException { return getImageCatalogV3(catalogUrl, false); }
ImageCatalogProvider { public CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl) throws CloudbreakImageCatalogException { return getImageCatalogV3(catalogUrl, false); } }
ImageCatalogProvider { public CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl) throws CloudbreakImageCatalogException { return getImageCatalogV3(catalogUrl, false); }  }
ImageCatalogProvider { public CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl) throws CloudbreakImageCatalogException { return getImageCatalogV3(catalogUrl, false); }  CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl); CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl, boolean forceRefresh); }
ImageCatalogProvider { public CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl) throws CloudbreakImageCatalogException { return getImageCatalogV3(catalogUrl, false); }  CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl); CloudbreakImageCatalogV3 getImageCatalogV3(String catalogUrl, boolean forceRefresh);  }