public int put(OncotatorRecord record) throws OncotatorCacheException {
    if (this.cache.get(record.getKey()) != null) {
      // simulate insertion error
      throw new OncotatorCacheException("duplicate entry for " + record.getKey());
    } else {
      this.cache.put(record.getKey(), record);
    }

    return 1;
  }
  protected OncotatorRecord generateRecord(
      String key,
      String cosmic,
      String dbSnpRs,
      String dbSnpValStatus,
      String type,
      String proteinChange,
      String geneSymbol,
      String refseqMrnaId,
      String refseqProtId,
      String uniprotEntry,
      String uniprotAccession,
      String codonChange,
      String transcriptChange,
      int exonAffected,
      String genomeChange,
      int proteinPosStart,
      int proteinPosEnd) {
    OncotatorRecord record = new OncotatorRecord(key);

    record.setCosmicOverlappingMutations(cosmic);
    record.setDbSnpRs(dbSnpRs);
    record.setDbSnpValStatus(dbSnpValStatus);
    record.setGenomeChange(genomeChange);
    record.getBestCanonicalTranscript().setProteinChange(proteinChange);
    record.getBestEffectTranscript().setProteinChange(proteinChange);
    record.getBestCanonicalTranscript().setVariantClassification(type);
    record.getBestEffectTranscript().setVariantClassification(type);
    record.getBestCanonicalTranscript().setGene(geneSymbol);
    record.getBestEffectTranscript().setGene(geneSymbol);
    record.getBestCanonicalTranscript().setExonAffected(exonAffected);
    record.getBestEffectTranscript().setExonAffected(exonAffected);
    record.getBestCanonicalTranscript().setRefseqMrnaId(refseqMrnaId);
    record.getBestEffectTranscript().setRefseqMrnaId(refseqMrnaId);
    record.getBestCanonicalTranscript().setRefseqProtId(refseqProtId);
    record.getBestEffectTranscript().setRefseqProtId(refseqProtId);
    record.getBestCanonicalTranscript().setUniprotName(uniprotEntry);
    record.getBestEffectTranscript().setUniprotName(uniprotEntry);
    record.getBestCanonicalTranscript().setUniprotAccession(uniprotAccession);
    record.getBestEffectTranscript().setUniprotAccession(uniprotAccession);
    record.getBestCanonicalTranscript().setCodonChange(codonChange);
    record.getBestEffectTranscript().setCodonChange(codonChange);
    record.getBestCanonicalTranscript().setTranscriptChange(transcriptChange);
    record.getBestEffectTranscript().setTranscriptChange(transcriptChange);
    record.getBestCanonicalTranscript().setProteinPosStart(proteinPosStart);
    record.getBestEffectTranscript().setProteinPosStart(proteinPosStart);
    record.getBestCanonicalTranscript().setProteinPosEnd(proteinPosEnd);
    record.getBestEffectTranscript().setProteinPosEnd(proteinPosEnd);

    return record;
  }