public PackageRepository findPackageRepositoryWithPackageIdOrBomb(String packageId) {
        PackageRepository packageRepository = findPackageRepositoryHaving(packageId);
        if (packageRepository == null){
            throw new RuntimeException(format("Could not find repository for given package id:[%s]", packageId));
        }
        return packageRepository;
    }
@Test
    void shouldThrowExceptionWhenRepositoryForGivenPackageNotFound() throws Exception {
        PackageRepositories packageRepositories = new PackageRepositories();

        try {
            packageRepositories.findPackageRepositoryWithPackageIdOrBomb("invalid");
            fail("should have thrown exception for not finding package repository");
        } catch (RuntimeException e) {
            assertThat(e.getMessage()).isEqualTo("Could not find repository for given package id:[invalid]");
        }
    }