LtsCheckingResult { @JsonProperty("passed") public boolean isPassed() { return this.prefix.isEmpty() && this.loop.isEmpty(); } LtsCheckingResult(LtsFormula formula, Long learnerResultId, Long learnerResultStepNo);  LtsCheckingResult(LtsFormula formula, Long learnerResultId, Long learnerResultStepNo, Word<String> prefix, Word<String> loop); List<String> getPrefix(); void setPrefix(List<String> prefix); List<String> getLoop(); void setLoop(List<String> loop); LtsFormula getFormula(); void setFormula(LtsFormula formula); Long getLearnerResultId(); void setLearnerResultId(Long learnerResultId); Long getLearnerResultStepNo(); void setLearnerResultStepNo(Long learnerResultStepNo); @JsonProperty("passed") boolean isPassed();  }
@Test public void shouldOnlyPassIfPrefixAndLoopAreEmpty() { LtsCheckingResult result = new LtsCheckingResult(new LtsFormula(), 1L, 1L); Assert.assertTrue(result.isPassed()); result = new LtsCheckingResult(new LtsFormula(), 1L, 1L, Word.fromSymbols("a"), Word.epsilon()); Assert.assertFalse(result.isPassed()); result = new LtsCheckingResult(new LtsFormula(), 1L, 1L, Word.epsilon(), Word.fromSymbols("a")); Assert.assertFalse(result.isPassed()); result = new LtsCheckingResult(new LtsFormula(), 1L, 1L, Word.fromSymbols("b"), Word.fromSymbols("a")); Assert.assertFalse(result.isPassed()); }