Class AnnotationSetDispositionPersistenceIT

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseIntegrationTest5
ubic.gemma.persistence.service.common.auditAndSecurity.curation.AnnotationSetDispositionPersistenceIT

@Transactional public class AnnotationSetDispositionPersistenceIT extends BaseIntegrationTest5
Persistence contract for AnnotationSetDisposition — the row-per-ruling, latest-wins model for a curator's verdict on ONE finding.

The properties worth pinning are the ones the two nearby designs would NOT have given: that two findings on one set are ruled independently (a set-level verdict cannot do this), and that a curator changing their mind leaves BOTH rows (the UNIQUE(set, judge) upsert on ANNOTATION_SET_TRIAGE would have destroyed the first).

  • Constructor Details

    • AnnotationSetDispositionPersistenceIT

      public AnnotationSetDispositionPersistenceIT()
  • Method Details

    • seed

      @BeforeEach public void seed()
    • unruled_hasNoRow

      @Test @DisplayName("an un-ruled finding has no row at all -- absence is the state") public void unruled_hasNoRow()
    • twoFindingsOnOneSet_ruledIndependently

      @Test @DisplayName("two findings on ONE set are ruled independently -- what a set-level verdict cannot do") public void twoFindingsOnOneSet_ruledIndependently()
    • changedMind_keepsBothRows

      @Test @DisplayName("append-only: a changed mind keeps BOTH rows, and the newer one stands") public void changedMind_keepsBothRows()
    • sameMillisecondTie_breaksOnId

      @Test @DisplayName("a same-millisecond tie resolves on id, not on row order") public void sameMillisecondTie_breaksOnId()
    • longestEnumValue_roundTrips

      @Test @DisplayName("NEEDS_MORE_INFO -- the longest value -- survives the VARCHAR(16) column") public void longestEnumValue_roundTrips()
    • finalizedSet_refusesRuling

      @Test @DisplayName("a finalized set refuses a ruling rather than dating one after its own summary") public void finalizedSet_refusesRuling()
    • batchedRead_omitsUnruledSets

      @Test @DisplayName("the batched read keys by set and omits sets nobody has ruled on") public void batchedRead_omitsUnruledSets()
    • needsMoreInfoWithoutReason_isRefused

      @Test @DisplayName("needs_more_info without a reason is refused -- it would not differ from no ruling") public void needsMoreInfoWithoutReason_isRefused()
    • acceptedAndDismissed_reasonStaysOptional

      @Test @DisplayName("the other two values still take a ruling with no reason, and keep one when given") public void acceptedAndDismissed_reasonStaysOptional()
    • twoFindingsOnOneTarget_ruledIndependently

      @Test @DisplayName("two findings on ONE target are ruled independently -- what target-keying could not do") public void twoFindingsOnOneTarget_ruledIndependently()
    • findingKeyedAndTargetKeyed_areSeparateBuckets

      @Test @DisplayName("a finding-keyed ruling never supersedes a target-keyed one on the same target") public void findingKeyedAndTargetKeyed_areSeparateBuckets()
    • blankReason_normalizesToNull

      @Test @DisplayName("a blank reason is stored as null so \"did they say why\" has one answer") public void blankReason_normalizesToNull()
    • clearDispositions_erasesEveryRulingAndCounts

      @Test @DisplayName("clearing erases every ruling on the set and reports how many went") public void clearDispositions_erasesEveryRulingAndCounts()
    • clearDispositions_onAnUnruledSet_isZero

      @Test @DisplayName("clearing a set nobody ruled on is a no-op reporting zero, not a failure") public void clearDispositions_onAnUnruledSet_isZero()