Class PreboardedWebServiceTest

java.lang.Object
ubic.gemma.rest.PreboardedWebServiceTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public class PreboardedWebServiceTest extends Object
Pure-Mockito unit tests for PreboardedWebService. Exercises the REST-shape contract: status codes, 409 mapping, idempotent 200 vs 201, the queue-by-state 501 pointer.
  • Constructor Details

    • PreboardedWebServiceTest

      public PreboardedWebServiceTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
    • getPreboarded_carriesTheSchemaVersionAlongsideThePayload

      @Test public void getPreboarded_carriesTheSchemaVersionAlongsideThePayload()
      The payload is opaque to Gemma, so the only way a consumer can tell which document shape it holds is the schema version. It was on the entity and not on the wire, which left "read the version before assuming keys" as advice a client could not act on (uib, 2026-09-03).
    • getPreboarded_schemaVersionIsNullWhenTheWriterSetNone

      @Test public void getPreboarded_schemaVersionIsNullWhenTheWriterSetNone()
      Null is a real answer — the scrape path leaves it unset, and "unset" is what distinguishes those rows.
    • createPreboarded_freshAccessionReturns201

      @Test public void createPreboarded_freshAccessionReturns201() throws Exception
      Throws:
      Exception
    • createPreboarded_missingBodyThrows400

      @Test public void createPreboarded_missingBodyThrows400()
    • createPreboarded_existingAccessionReturns409WithIdAndType

      @Test public void createPreboarded_existingAccessionReturns409WithIdAndType() throws Exception
      Throws:
      Exception
    • createPreboarded_existingEEAccessionReturns409WithEEType

      @Test public void createPreboarded_existingEEAccessionReturns409WithEEType() throws Exception
      Throws:
      Exception
    • getPreboarded_returnsLatestAnnotationSetAndCount

      @Test public void getPreboarded_returnsLatestAnnotationSetAndCount()
    • getPreboarded_unknownIdThrows404

      @Test public void getPreboarded_unknownIdThrows404()
    • listOrResolvePreboarded_byAccessionReturnsPreboarded

      @Test public void listOrResolvePreboarded_byAccessionReturnsPreboarded()
    • listOrResolvePreboarded_byAccessionUnknownThrows404

      @Test public void listOrResolvePreboarded_byAccessionUnknownThrows404()
    • listOrResolvePreboarded_byStateReturns501PointerToWorkflowQueue

      @Test public void listOrResolvePreboarded_byStateReturns501PointerToWorkflowQueue()
    • listOrResolvePreboarded_neitherParamThrows400

      @Test public void listOrResolvePreboarded_neitherParamThrows400()
    • attachAnnotationSet_newRunIdReturns201

      @Test public void attachAnnotationSet_newRunIdReturns201()
    • attachAnnotationSet_existingRunIdReturns200

      @Test public void attachAnnotationSet_existingRunIdReturns200()
    • attachAnnotationSet_blankRunIdThrows400

      @Test public void attachAnnotationSet_blankRunIdThrows400()
    • attachAnnotationSet_unknownPreboardedThrows404

      @Test public void attachAnnotationSet_unknownPreboardedThrows404()
    • promotePreboarded_validReturns200WithCounts

      @Test public void promotePreboarded_validReturns200WithCounts() throws Exception
      Throws:
      Exception
    • promotePreboarded_missingEeIdThrows400

      @Test public void promotePreboarded_missingEeIdThrows400()
    • promotePreboarded_unknownEeThrows404

      @Test public void promotePreboarded_unknownEeThrows404()
    • promotePreboarded_alreadyPromotedReturns409

      @Test public void promotePreboarded_alreadyPromotedReturns409() throws Exception
      Throws:
      Exception