@Test public void testIsOffline$failure() throws Exception { new MockUp<ApplicationEngine>() { @Mock public ApplicationEngine engine() throws ApplicationEngineException { throw new ApplicationEngineException("FAILURE"); } }; CoreRuntimeDelegate sut=new CoreRuntimeDelegate(); assertThat(sut.isOffline(),equalTo(true)); }
@Override public boolean isOffline() { boolean result=true; try { result=!applicationEngine().state().isStarted(); } catch (ApplicationEngineException e) { LOGGER.warn("Could not check engine state",e); } return result; }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public boolean isOffline() { boolean result=true; try { result=!applicationEngine().state().isStarted(); } catch (ApplicationEngineException e) { LOGGER.warn("Could not check engine state",e); } return result; } }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public boolean isOffline() { boolean result=true; try { result=!applicationEngine().state().isStarted(); } catch (ApplicationEngineException e) { LOGGER.warn("Could not check engine state",e); } return result; } CoreRuntimeDelegate(); }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public boolean isOffline() { boolean result=true; try { result=!applicationEngine().state().isStarted(); } catch (ApplicationEngineException e) { LOGGER.warn("Could not check engine state",e); } return result; } CoreRuntimeDelegate(); @Override boolean isOffline(); @Override WriteSession createSession(); @Override ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session); @Override void registerShutdownListener(ShutdownListener listener); }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public boolean isOffline() { boolean result=true; try { result=!applicationEngine().state().isStarted(); } catch (ApplicationEngineException e) { LOGGER.warn("Could not check engine state",e); } return result; } CoreRuntimeDelegate(); @Override boolean isOffline(); @Override WriteSession createSession(); @Override ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session); @Override void registerShutdownListener(ShutdownListener listener);  }