### Question:
ClassificationResult { public List<MatchBuilder> getMatchBuilders() { if (isSuccessful == false) { throw new IllegalStateException("Classification was not successfull."); } return matchBuilders; } ClassificationResult(String errorMessage);  ClassificationResult(List<MatchBuilder> matches); List<MatchBuilder> getMatchBuilders(); String getErrorMessage(); boolean isSuccessfull();  }### Answer:
@Test public void testGetMatchBuilders_Success() { ClassificationResult result = new ClassificationResult(matches); assertEquals(matches, result.getMatchBuilders()); }
@Test(expected = IllegalStateException.class) public void testGetMatchBuilders_Failure() { ClassificationResult result = new ClassificationResult(errorMessage); result.getMatchBuilders(); }