@Test public void createStubContextWithNoExecutionContext() { when(this.execution.getContext()).thenReturn(null); assertNotNull(this.provider.createStubContext()); }
@Override public XWikiContext createStubContext() { XWikiContext stubContext; if (this.initialContext != null) { ExecutionContext econtext = this.execution.getContext(); if (econtext != null) { stubContext = (XWikiContext) econtext.getProperty(XCONTEXT_STUB); if (stubContext != null) { return stubContext; } } try { stubContext = this.initialContext.clone(); if (econtext != null) { econtext.setProperty(XCONTEXT_STUB, stubContext); } initiazeXWikiContext(stubContext); } finally { if (econtext != null) { econtext.removeProperty(XCONTEXT_STUB); } } } else { stubContext = null; } return stubContext; }
DefaultXWikiStubContextProvider implements XWikiStubContextProvider { @Override public XWikiContext createStubContext() { XWikiContext stubContext; if (this.initialContext != null) { ExecutionContext econtext = this.execution.getContext(); if (econtext != null) { stubContext = (XWikiContext) econtext.getProperty(XCONTEXT_STUB); if (stubContext != null) { return stubContext; } } try { stubContext = this.initialContext.clone(); if (econtext != null) { econtext.setProperty(XCONTEXT_STUB, stubContext); } initiazeXWikiContext(stubContext); } finally { if (econtext != null) { econtext.removeProperty(XCONTEXT_STUB); } } } else { stubContext = null; } return stubContext; } }
DefaultXWikiStubContextProvider implements XWikiStubContextProvider { @Override public XWikiContext createStubContext() { XWikiContext stubContext; if (this.initialContext != null) { ExecutionContext econtext = this.execution.getContext(); if (econtext != null) { stubContext = (XWikiContext) econtext.getProperty(XCONTEXT_STUB); if (stubContext != null) { return stubContext; } } try { stubContext = this.initialContext.clone(); if (econtext != null) { econtext.setProperty(XCONTEXT_STUB, stubContext); } initiazeXWikiContext(stubContext); } finally { if (econtext != null) { econtext.removeProperty(XCONTEXT_STUB); } } } else { stubContext = null; } return stubContext; }  }
DefaultXWikiStubContextProvider implements XWikiStubContextProvider { @Override public XWikiContext createStubContext() { XWikiContext stubContext; if (this.initialContext != null) { ExecutionContext econtext = this.execution.getContext(); if (econtext != null) { stubContext = (XWikiContext) econtext.getProperty(XCONTEXT_STUB); if (stubContext != null) { return stubContext; } } try { stubContext = this.initialContext.clone(); if (econtext != null) { econtext.setProperty(XCONTEXT_STUB, stubContext); } initiazeXWikiContext(stubContext); } finally { if (econtext != null) { econtext.removeProperty(XCONTEXT_STUB); } } } else { stubContext = null; } return stubContext; }  @Override void initialize(XWikiContext context); @Override XWikiContext createStubContext(); }
DefaultXWikiStubContextProvider implements XWikiStubContextProvider { @Override public XWikiContext createStubContext() { XWikiContext stubContext; if (this.initialContext != null) { ExecutionContext econtext = this.execution.getContext(); if (econtext != null) { stubContext = (XWikiContext) econtext.getProperty(XCONTEXT_STUB); if (stubContext != null) { return stubContext; } } try { stubContext = this.initialContext.clone(); if (econtext != null) { econtext.setProperty(XCONTEXT_STUB, stubContext); } initiazeXWikiContext(stubContext); } finally { if (econtext != null) { econtext.removeProperty(XCONTEXT_STUB); } } } else { stubContext = null; } return stubContext; }  @Override void initialize(XWikiContext context); @Override XWikiContext createStubContext();  }