ArtifactHandler { public List<DbArtifact> getArtifacts(final FiltersHolder filters) { return repositoryHandler.getArtifacts(filters); } ArtifactHandler(final RepositoryHandler repositoryHandler,
                           final LicenseMatcher matcher); void store(final DbArtifact dbArtifact); void storeIfNew(final DbArtifact fromClient); void addLicense(final String gavc, final String licenseId); List<String> getArtifactGavcs(final FiltersHolder filters); List<String> getArtifactGroupIds(final FiltersHolder filters); List<String> getArtifactVersions(final String gavc); String getArtifactLastVersion(final String gavc); DbArtifact getArtifact(final String gavc); DbArtifact getArtifactUsingSHA256(final String sha256); DbModule getModule(final DbArtifact dbArtifact); DbOrganization getOrganization(final DbArtifact dbArtifact); void updateDownLoadUrl(final String gavc, final String downLoadUrl); void updateProvider(final String gavc, final String provider); void deleteArtifact(final String gavc); void updateDoNotUse(final String gavc, final Boolean doNotUse); List<DbModule> getAncestors(final String gavc, final FiltersHolder filters); List<DbLicense> getArtifactLicenses(final String gavc, final FiltersHolder filters); void addLicenseToArtifact(final String gavc, final String licenseId); void removeLicenseFromArtifact(final String gavc, final String licenseId); List<DbArtifact> getArtifacts(final FiltersHolder filters); String getModuleJenkinsJobInfo(final DbArtifact dbArtifact);  }
@Test public void checkGetAllArtifact(){ final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class); final ArtifactHandler handler = new ArtifactHandler(repositoryHandler, mock(LicenseMatcher.class)); final FiltersHolder filtersHolder = mock(FiltersHolder.class); handler.getArtifacts(filtersHolder); verify(repositoryHandler, times(1)).getArtifacts(filtersHolder); }