### Question:
ArtifactDetails { static List<URLChecksumEntity> getArtifactDetailsForCurrentPlatformByNames(File downloadFile, List<String> artifactNames) throws FileNotFoundException { Preconditions.checkNotNull(downloadFile, "The JSON to get artifact details cannot be null"); List<URLChecksumEntity> artifactDetails = new ArrayList<URLChecksumEntity>(); JsonArray downloads = (new JsonParser()).parse(new FileReader(downloadFile)).getAsJsonArray(); for (String artifactName : artifactNames) { for (int i = 0; i < downloads.size(); i++) { JsonObject artifact = (JsonObject) downloads.get(i); if (artifact.has(NAME) && artifact.get(NAME).getAsString().equalsIgnoreCase(artifactName)) { JsonElement platformJson = artifact.has("any") ? artifact.get("any") : artifact.get(getPlatform()); if (platformJson != null) { JsonObject platform = platformJson.getAsJsonObject(); String url = platform.get(URL).getAsString(); String checksum = platform.get(CHECKSUM).getAsString(); URLChecksumEntity entity = getEntityFromProp(URL, url, CHECKSUM, checksum); artifactDetails.add(entity); } } } } return artifactDetails; }    }### Answer:
@Test public void testGetArtifactDetailsByName() throws FileNotFoundException { List<String> downloads = new ArrayList<>(); downloads.add("selenium"); File fileToTest = new File("src/test/resources/config/Dummydownload.json"); List<URLChecksumEntity> parsedDetails = ArtifactDetails.getArtifactDetailsForCurrentPlatformByNames(fileToTest, downloads); assertEquals(parsedDetails.size(), 1); URLChecksumEntity entity = parsedDetails.get(0); assertEquals(entity.getUrl().getValue(), "seleniumURL"); assertEquals(entity.getChecksum().getValue(), "seleniumChecksum"); }