### Question:
Model { public void run() { KeanuProbabilisticModel model = new KeanuProbabilisticModel(buildBayesianNetwork()); Integer numSamples = 500; results = Keanu.Sampling.MetropolisHastings.withDefaultConfig().generatePosteriorSamples( model, model.getLatentVariables() ).dropCount(numSamples/5).downSampleInterval(3).generate(numSamples); } Model(Data data); static void main(String[] args); void run();  }### Answer:
@Test public void shouldFindCorrectSwitchYear() { Data coalMiningDisasterData = Data.load("coal-mining-disaster-data.csv"); Model model = new Model(coalMiningDisasterData); model.run(); int switchYear = model.results.getIntegerTensorSamples(model.switchpoint).getScalarMode(); assertEquals(switchYear, 1890); }