Class AnalysisResultSetsWebServicePvalueDistributionTest

java.lang.Object
ubic.gemma.rest.AnalysisResultSetsWebServicePvalueDistributionTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public class AnalysisResultSetsWebServicePvalueDistributionTest extends Object
Unit tests for AnalysisResultSetsWebService.getPvalueDistribution(ExpressionAnalysisResultSetArg, int, String), which serves the stored PVALUE_DISTRIBUTION histogram rather than aggregating DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT (120.5 GB / ~1.57e9 rows on production) per request. Pure Mockito — what is pinned is the routing, the rebinning arithmetic and the four refusals, not the DAO.
  • Constructor Details

    • AnalysisResultSetsWebServicePvalueDistributionTest

      public AnalysisResultSetsWebServicePvalueDistributionTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
    • servesTheStoredHistogramVerbatimAt100Bins

      @Test public void servesTheStoredHistogramVerbatimAt100Bins()
    • downBinningMergesWholeStoredBinsAndPreservesTheTotal

      @Test public void downBinningMergesWholeStoredBinsAndPreservesTheTotal()
    • everyDivisorOf100IsAcceptedIncludingTheDefault20

      @Test public void everyDivisorOf100IsAcceptedIncludingTheDefault20()
    • aNonDivisorBinCountIsRejectedWithTheAcceptedValues

      @Test public void aNonDivisorBinCountIsRejectedWithTheAcceptedValues()
    • aBinCountBelowOneIsRejectedBeforeAnythingIsLoaded

      @Test public void aBinCountBelowOneIsRejectedBeforeAnythingIsLoaded()
    • correctedIsRejectedRatherThanSilentlyServedTheRawDistribution

      @Test public void correctedIsRejectedRatherThanSilentlyServedTheRawDistribution()
    • anUnknownColumnIsRejected

      @Test public void anUnknownColumnIsRejected()
    • theWireDefaultsAreRawAnd20Bins

      @Test public void theWireDefaultsAreRawAnd20Bins()
      The wire default has to be raw. A direct method call bypasses JAX-RS parameter binding, so this reads the @DefaultValue off the production method instead.
    • noStoredHistogramIs404NotAnEmpty200Or204

      @Test public void noStoredHistogramIs404NotAnEmpty200Or204()
    • anAllZeroStoredHistogramIs204

      @Test public void anAllZeroStoredHistogramIs204()
    • aStoredHistogramWithNoBinsIs204

      @Test public void aStoredHistogramWithNoBinsIs204()