CompositeResourceManager implements ResourceManager { @Override public Resource getResource(String path) throws IOException { for (ResourceManager resourceManager : this.resourceManagers) { Resource resource = resourceManager.getResource(path); if (resource != null) { return resource; } } return null; } CompositeResourceManager(ResourceManager... resourceManagers); @Override void close(); @Override Resource getResource(String path); @Override boolean isResourceChangeListenerSupported(); @Override void registerResourceChangeListener(ResourceChangeListener listener); @Override void removeResourceChangeListener(ResourceChangeListener listener);  }
@Test public void testGetResource_empty() throws IOException { assertThat(new CompositeResourceManager().getResource(null)).isNull(); assertThat(new CompositeResourceManager().getResource("")).isNull(); assertThat(new CompositeResourceManager().getResource("/index.xhtml")).isNull(); }