@Test public void testIsSupportedWithLastSupported() throws Exception { String location = "schema3:/test/resource"; when(resourceLoader1.isSupported(location)).thenReturn(false); when(resourceLoader2.isSupported(location)).thenReturn(false); when(resourceLoader3.isSupported(location)).thenReturn(true); boolean result = resourceLoader.isSupported(location); assertThat(result).isTrue(); InOrder inOrder = resourcesInOrder(); inOrder.verify(resourceLoader1).isSupported(location); inOrder.verify(resourceLoader2).isSupported(location); inOrder.verify(resourceLoader3).isSupported(location); inOrder.verifyNoMoreInteractions(); }
@Override public boolean isSupported(String location) { return getSupportedResourceLoader(location) != null; }
ChainedResourceLoader implements ResourceLoader { @Override public boolean isSupported(String location) { return getSupportedResourceLoader(location) != null; } }
ChainedResourceLoader implements ResourceLoader { @Override public boolean isSupported(String location) { return getSupportedResourceLoader(location) != null; } ChainedResourceLoader(Collection<ResourceLoader> resourceLoaders); }
ChainedResourceLoader implements ResourceLoader { @Override public boolean isSupported(String location) { return getSupportedResourceLoader(location) != null; } ChainedResourceLoader(Collection<ResourceLoader> resourceLoaders); @Override boolean isSupported(String location); @Override InputStream openStream(String location); }
ChainedResourceLoader implements ResourceLoader { @Override public boolean isSupported(String location) { return getSupportedResourceLoader(location) != null; } ChainedResourceLoader(Collection<ResourceLoader> resourceLoaders); @Override boolean isSupported(String location); @Override InputStream openStream(String location);  }