}
@Test
public void test() {
try {
IJdProcessExceptionHandler jdProcessExceptionHandler = JdProcessExceptionHandlerLoader.load(JdProcessExceptionHandler.class.getName());
CAS cas = null;
Exception e = null;
Properties p = null;
jdProcessExceptionHandler.handle("test001",cas, e, p);
} catch (ClassNotFoundException e) {
e.printStackTrace();
fail("Exception");
} catch (IllegalAccessException e) {
e.printStackTrace();
fail("Exception");
} catch (InstantiationException e) {
e.printStackTrace();
fail("Exception");
}
try {
IJdProcessExceptionHandler jdProcessExceptionHandler = JdProcessExceptionHandlerLoader.load("org.apache.uima.ducc.common.jd.plugin.example.ExampleJdProcessExceptionHandler");
CAS cas = null;
Exception e = null;
Properties p = null;
jdProcessExceptionHandler.handle("test002",cas, e, p);
} catch (ClassNotFoundException e) {
e.printStackTrace();
fail("Exception");
} catch (IllegalAccessException e) {
e.printStackTrace();
fail("Exception");
} catch (InstantiationException e) {
e.printStackTrace();
fail("Exception");
}
try {
IJdProcessExceptionHandler jdProcessExceptionHandler = JdProcessExceptionHandlerLoader.load("org.apache.uima.ducc.common.jd.plugin.example.BadJdProcessExceptionHandler");
CAS cas = null;
Exception e = null;
Properties p = null;
jdProcessExceptionHandler.handle("test003",cas, e, p);
fail("No Exception?");
} catch (ClassNotFoundException e) {
//Expected
} catch (IllegalAccessException e) {
e.printStackTrace();