Class CompletionsWebServiceTest

java.lang.Object
ubic.gemma.rest.CompletionsWebServiceTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public class CompletionsWebServiceTest extends Object
Pure Mockito unit tests for CompletionsWebService. Verifies prefix matching, dedup, limit clamping, and per-type fan-out without standing up Jersey.
  • Constructor Details

    • CompletionsWebServiceTest

      public CompletionsWebServiceTest()
  • Method Details

    • testTaxonCompletionsFanOut

      @Test public void testTaxonCompletionsFanOut()
    • testTaxonCompletionsCaseInsensitivePrefix

      @Test public void testTaxonCompletionsCaseInsensitivePrefix()
    • testTaxonCompletionsLimitClampedToMax

      @Test public void testTaxonCompletionsLimitClampedToMax()
    • testPlatformCompletionsIncludeAlternateNames

      @Test public void testPlatformCompletionsIncludeAlternateNames()
    • testPlatformCompletionsGenericFlagSwitchesSource

      @Test public void testPlatformCompletionsGenericFlagSwitchesSource()
    • testPlatformCompletionsPrefixOnShortName

      @Test public void testPlatformCompletionsPrefixOnShortName()
    • testProtocolCompletionsDedup

      @Test public void testProtocolCompletionsDedup()
    • testDatasetGroupCompletions

      @Test public void testDatasetGroupCompletions()
    • testDatasetCompletionsHonourLimit

      @Test public void testDatasetCompletionsHonourLimit()
    • testDatasetCompletionsEmptyPrefixReturnsAll

      @Test public void testDatasetCompletionsEmptyPrefixReturnsAll()
    • testOntologyTermCompletionsExpandToTermId

      @Test public void testOntologyTermCompletionsExpandToTermId()
    • testOntologyTermCompletionsPrefixMatchesOboId

      @Test public void testOntologyTermCompletionsPrefixMatchesOboId()
    • testTheRetiredSpellingIsNotSuggested

      @Test public void testTheRetiredSpellingIsNotSuggested()
      🛑 The picker must not hand out a term the read path is going to rewrite.

      The corpus stores CLO_0007365 "LNCAP cell" and every read serves CLO_0037116 "LNCaP cell". Suggesting the stored spelling is how new rows in the retired form kept being written: the curator picks it, it is saved verbatim, and the design tab renders the other one back. Reported by uib as one value rendering two names, 2026-08-28.

    • testTypingTheRetiredIdStillFindsTheTerm

      @Test public void testTypingTheRetiredIdStillFindsTheTerm()
      ...and typing the retired id still finds the term. Matching on the canonical spelling alone would answer a well-formed lookup with nothing at all.