public void removePackageRepository(String id) {
        PackageRepository packageRepositoryToBeDeleted = this.find(id);
        if (packageRepositoryToBeDeleted == null) {
            throw new RuntimeException(String.format("Could not find repository with id '%s'", id));
        }
        this.remove(packageRepositoryToBeDeleted);
    }
@Test
    void shouldFindPackageRepositoryById() throws Exception {
        PackageRepositories packageRepositories = new PackageRepositories();
        packageRepositories.add(PackageRepositoryMother.create("repo1"));
        PackageRepository repo2 = PackageRepositoryMother.create("repo2");
        packageRepositories.add(repo2);
        packageRepositories.removePackageRepository("repo1");

        assertThat(packageRepositories).containsExactly(repo2);
    }