@Test public void testResolverSnapshotResolver$resolveEndpoint$kernelResourceNotFound() throws Exception { final URI base = URI.create("http: final String path="resource/path/"; new Expectations() {{ engine.unwrap(DefaultApplicationEngine.class);result=engine; engine.endpointManagementService();result=endpointManagementService; endpointManagementService.resolveEndpoint(path);result=endpoint; endpoint.deleted();result=null; engine.unwrap(DefaultApplicationEngine.class);result=engine; engine.activeContext();result=context; context.resolveResource(endpoint);result=null; }}; new MockUp<ApplicationEngine>() { @Mock public ApplicationEngine engine() throws ApplicationEngineException { return engine; } }; CoreRuntimeDelegate sut=new CoreRuntimeDelegate(); ResourceSnapshotResolver resolver = sut.createResourceResolver(base, session); assertThat(resolver.resolve(base.resolve(path)),nullValue()); }
@Override public ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session) { return new DefaultSnapshotResolver(canonicalBase,session); }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session) { return new DefaultSnapshotResolver(canonicalBase,session); } }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session) { return new DefaultSnapshotResolver(canonicalBase,session); } CoreRuntimeDelegate(); }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session) { return new DefaultSnapshotResolver(canonicalBase,session); } CoreRuntimeDelegate(); @Override boolean isOffline(); @Override WriteSession createSession(); @Override ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session); @Override void registerShutdownListener(ShutdownListener listener); }
CoreRuntimeDelegate extends RuntimeDelegate { @Override public ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session) { return new DefaultSnapshotResolver(canonicalBase,session); } CoreRuntimeDelegate(); @Override boolean isOffline(); @Override WriteSession createSession(); @Override ResourceSnapshotResolver createResourceResolver(URI canonicalBase, ReadSession session); @Override void registerShutdownListener(ShutdownListener listener);  }