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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidvoidThe payload is opaque to Gemma, so the only way a consumer can tell which document shape it holds is the schema version.voidvoidNull is a real answer — the scrape path leaves it unset, and "unset" is what distinguishes those rows.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidsetUp()
-
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
-
createPreboarded_missingBodyThrows400
@Test public void createPreboarded_missingBodyThrows400() -
createPreboarded_existingAccessionReturns409WithIdAndType
-
createPreboarded_existingEEAccessionReturns409WithEEType
-
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
-
promotePreboarded_missingEeIdThrows400
@Test public void promotePreboarded_missingEeIdThrows400() -
promotePreboarded_unknownEeThrows404
@Test public void promotePreboarded_unknownEeThrows404() -
promotePreboarded_alreadyPromotedReturns409
-