@Test public void testInitServiceThrowsNullPointerException1() throws Throwable { DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor(); String[] args = new String[3]; args[0] = "vI"; args[1] = "e."; args[2] = "testString"; dailyTaskAdaptor.setServer(q2); try { dailyTaskAdaptor.initService(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"org.jdom2.Element.getChildTextTrim(String)\" because \"e\" is null", ex.getMessage(), "ex.getMessage()"); } assertFalse(dailyTaskAdaptor.isModified(), "dailyTaskAdaptor.isModified()"); assertNull(dailyTaskAdaptor.task, "dailyTaskAdaptor.task"); } }
protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = (Runnable) factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); }
DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = (Runnable) factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } }
DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = (Runnable) factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } DailyTaskAdaptor(); }
DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = (Runnable) factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } DailyTaskAdaptor(); void run(); Date getWhen(); }
DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void initService () throws Exception { QFactory factory = getServer().getFactory(); Element e = getPersist (); task = (Runnable) factory.newInstance (e.getChildTextTrim ("class")); factory.setLogger (task, e); } DailyTaskAdaptor(); void run(); Date getWhen();  }