@Test
public void validateNoRegressionTables() throws Exception {

    final PMML pmml = TestUtils.loadFromFile(SOURCE_1);
    assertNotNull(pmml);
    assertEquals(1, pmml.getModels().size());
    assertTrue(pmml.getModels().get(0) instanceof RegressionModel);
    RegressionModel regressionModel = (RegressionModel) pmml.getModels().get(0);
    regressionModel.getRegressionTables().clear();
    try {
        PROVIDER.validate(pmml.getDataDictionary(), regressionModel);
        fail("Expecting validation failure due to missing RegressionTables");
    } catch (KiePMMLException e) {
        // Expected
    }
    regressionModel = new RegressionModel(regressionModel.getMiningFunction(), regressionModel.getMiningSchema(), null);
    try {
        PROVIDER.validate(pmml.getDataDictionary(), regressionModel);
        fail("Expecting validation failure due to missing RegressionTables");
    } catch (KiePMMLException e) {
        // Expected
    }
}