    @Test
    public final void testInvalidClass() throws URISyntaxException, ExecutionException, InterruptedException {

        final Path modelPath = Paths.get(getClass().getResource("/dummy_model").toURI());
        final String id = "classificationModel";
        final List<FieldSchema> fields = ImmutableList.of(FIELD_SCHEMA, CATEGORICAL_FIELD_SCHEMA);
        final String illegalTargetValue = "those";
        final DatasetSchema schema = new DatasetSchema(1, fields);
        final Random random = new Random();

        this.jepInstance.submitEvaluation(jep -> {
            // Add the model folder to the python import path
            jep.eval("import sys");
            jep.eval(String.format("sys.path.append(\"%s\")", modelPath.toAbsolutePath()));

            // Import the Classifier custom class and store an instance of it in a variable with the name passed in "id"
            jep.eval("from classifier import Classifier");
            jep.eval(String.format("%s = Classifier('%s')", id, illegalTargetValue));

            return null;
        }).get();

        final ClassificationPythonModel model = new ClassificationPythonModel(this.jepInstance, schema, id, "classify", "getClassDistribution");

        assertThatThrownBy(() -> model.classify(new MockInstance(schema, random)))
                .as("A classifier that does not return a valid target value will fail with a null pointer exception")
                .isInstanceOf(NullPointerException.class);
    }