### Question:
OnDeployExecutorImpl extends AnnotatedStandardMBean implements OnDeployExecutorMBean, OnDeployExecutor { protected ResourceResolver logIn() { try { Map<String, Object> userParams = new HashMap<>(); userParams.put(ResourceResolverFactory.SUBSERVICE, SERVICE_NAME); return resourceResolverFactory.getServiceResourceResolver(userParams); } catch (LoginException le2) { logger.error("On-deploy scripts cannot be run because the system cannot log in with the appropriate service user"); throw new OnDeployEarlyTerminationException(le2); } } OnDeployExecutorImpl(); @Override TabularDataSupport getScripts(); @Override boolean executeScript(String scriptName, boolean force);  }### Answer:
@Test public void testExecuteNoScripts() throws NotCompliantMBeanException { OnDeployExecutorImpl impl = spy(new OnDeployExecutorImpl()); context.registerService(OnDeployScriptProvider.class, Collections::emptyList); context.registerInjectActivateService(impl); assertLogText("No on-deploy scripts found."); verify(impl, never()).logIn(); }