### Question:
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);  }### Answer:
@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)); }