@Test public void testInitServiceThrowsNullPointerException() throws Throwable { TaskAdaptor taskAdaptor = new TaskAdaptor(); try { taskAdaptor.initService(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"org.jpos.q2.Q2.getFactory()\" because the return value of \"org.jpos.q2.iso.TaskAdaptor.getServer()\" is null", ex.getMessage(), "ex.getMessage()"); } assertNull(taskAdaptor.task, "taskAdaptor.task"); assertTrue(taskAdaptor.isModified(), "taskAdaptor.isModified()"); } }
protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); }
TaskAdaptor extends QBeanSupport { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } }
TaskAdaptor extends QBeanSupport { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } TaskAdaptor(); }
TaskAdaptor extends QBeanSupport { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } TaskAdaptor(); Object getObject(); }
TaskAdaptor extends QBeanSupport { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } TaskAdaptor(); Object getObject();  }