class ReleasePackageJsonImport implements JsonImportPackage<ReleasePackage, Release> {

    @Override
    public Collection<Release> importObjects() throws IOException {
        final ReleasePackage releasePackage = (ReleasePackage) releasePackageJsonToObject.toObject();
        final Collection<Release> savedReleases = new LinkedHashSet<>();

        if (!releasePackage.getReleases().isEmpty()) {
            Set<Release> releases = releasePackage.getReleases();
            for (Release release : releases) {
                Release savedRelease = releaseRepository.save(release);
                savedReleases.add(savedRelease);
            }
        }

        return savedReleases;
    }

    public  ReleasePackageJsonImport(final ReleaseRepository releaseRepository,
                                    final String releasePackageJsonToObject);
    public  ReleasePackageJsonImport(final ReleaseRepository releaseRepository, final File file);

}