### Question:
Experiment { public <I, D> Experiment(LearningAlgorithm<? extends A, I, D> learningAlgorithm, EquivalenceOracle<? super A, I, D> equivalenceAlgorithm, Alphabet<I> inputs) { this.impl = new ExperimentImpl<>(learningAlgorithm, equivalenceAlgorithm, inputs); } <I, D> Experiment(LearningAlgorithm<? extends A, I, D> learningAlgorithm,
                             EquivalenceOracle<? super A, I, D> equivalenceAlgorithm,
                             Alphabet<I> inputs); A run(); A getFinalHypothesis(); void setLogModels(boolean logModels); void setProfile(boolean profile); Counter getRounds(); static final String LEARNING_PROFILE_KEY; static final String COUNTEREXAMPLE_PROFILE_KEY; }### Answer:
@Test public void testExperiment() { final Alphabet<Character> alphabet = Alphabets.characters('a', 'c'); final CompactDFA<Character> target = RandomAutomata.randomDFA(RANDOM, 5, alphabet); final CompactDFA<Character> intermediateTarget = RandomAutomata.randomDFA(RANDOM, target.size() - 1, alphabet); final MockUpLearner<Character> learner = new MockUpLearner<>(target, intermediateTarget); final DFAEquivalenceOracle<Character> eq = new MockUpOracle<>(intermediateTarget); DFAExperiment<Character> experiment = new DFAExperiment<>(learner, eq, alphabet); experiment.setProfile(true); Assert.assertThrows(experiment::getFinalHypothesis); experiment.run(); Assert.assertThrows(experiment::run); DFA<?, Character> finalModel = experiment.getFinalHypothesis(); Assert.assertNotNull(experiment.getFinalHypothesis()); Assert.assertSame(finalModel, target); Assert.assertTrue(learner.startLearningCalled); Assert.assertEquals(learner.refinementSteps, REFINEMENT_STEPS); Assert.assertNotNull(SimpleProfiler.cumulated(Experiment.LEARNING_PROFILE_KEY)); Assert.assertNotNull(SimpleProfiler.cumulated(Experiment.COUNTEREXAMPLE_PROFILE_KEY)); }