@Test
public void testSchemaValidation() throws SQLException
{

    try {
        //Stop the current kernel and database
        destroy();
        destroyKernel();
        //Create a new Kernel but do not init the database. This should trigger missing table validation errors
        initKernel();
        init();
        //If we get here without exception, the validation did not happen
        fail();
    } catch(DatabaseSchemaValidationException ex) {
        assertTrue(StringUtils.isNotBlank(ex.getMessage()));
        assertTrue(StringUtils.contains(ex.getMessage(), "Missing table"));
    } finally {
        //restore correct state
        destroy();
        destroyKernel();
        initKernel();
        initDatabase();
        init();
    }
}