### Question:
ChallengerDisaster { public static ChallengerPosteriors run() { ChallengerData data = ReadCsv.fromResources("challenger_data.csv") .asVectorizedColumnsDefinedBy(ChallengerData.class) .load(); final double betaSigma = convertTauToSigma(0.01); final double alphaSigma = convertTauToSigma(0.005); GaussianVertex alpha = new GaussianVertex(0, alphaSigma); GaussianVertex beta = new GaussianVertex(0, betaSigma); DoubleVertex temps = new ConstantDoubleVertex(data.temps); DoubleVertex logisticOutput = createLogisticFunction(beta, alpha, temps); BernoulliVertex defect = new BernoulliVertex(logisticOutput); defect.observe(data.oRingFailure); BayesianNetwork net = new BayesianNetwork(defect.getConnectedGraph()); net.probeForNonZeroProbability(1000); KeanuProbabilisticModel model = new KeanuProbabilisticModel(net); final int sampleCount = 3000; NetworkSamples networkSamples = Keanu.Sampling.MetropolisHastings.withDefaultConfig() .generatePosteriorSamples(model, model.getLatentVariables()) .dropCount(sampleCount / 2) .downSampleInterval(model.getLatentVariables().size()) .generate(sampleCount); ChallengerPosteriors cp = new ChallengerPosteriors(); cp.mapAlpha = networkSamples.getDoubleTensorSamples(alpha).getAverages().scalar(); cp.mapBeta = networkSamples.getDoubleTensorSamples(beta).getAverages().scalar(); return cp; }  static ChallengerPosteriors run();  }### Answer:
@Test public void testWhenChallengerDisasterIsRunThenBetaIsSmallAndPositive() { ChallengerDisaster.ChallengerPosteriors posteriors = ChallengerDisaster.run(); log.info("mapAlpha " + posteriors.mapAlpha); log.info("mapBeta " + posteriors.mapBeta); assertThat(posteriors.mapBeta).isCloseTo(0.2, within(0.2)); assertThat(posteriors.mapAlpha).isCloseTo(-15d, within(15d)); }