@Test public void getProcessesXmlUrls() throws Exception { OSGiParseProcessesXmlStep step = new OSGiParseProcessesXmlStep(); Bundle bundle = mock(Bundle.class); URL url = new URL("http: when(bundle.getResources(eq("foo"))).thenReturn(Collections.enumeration(Collections.singleton(url))); List<URL> urls = step.getProcessesXmlUrls(new String[]{"foo"}, new OSGiProcessApplication(bundle, null)); assertThat(urls, hasItem(url)); }
@Override protected List<URL> getProcessesXmlUrls(String[] deploymentDescriptors, AbstractProcessApplication processApplication) { OSGiProcessApplication osgiProcessApplication = (OSGiProcessApplication) processApplication; List<URL> urls = new ArrayList<URL>(); for (String descriptorName : deploymentDescriptors) { Enumeration<URL> foundDescriptors; try { foundDescriptors = osgiProcessApplication.getBundle().getResources(descriptorName); while (foundDescriptors.hasMoreElements()) { urls.add(foundDescriptors.nextElement()); } } catch (IOException e) { e.printStackTrace(); } } return urls; }
OSGiParseProcessesXmlStep extends ParseProcessesXmlStep { @Override protected List<URL> getProcessesXmlUrls(String[] deploymentDescriptors, AbstractProcessApplication processApplication) { OSGiProcessApplication osgiProcessApplication = (OSGiProcessApplication) processApplication; List<URL> urls = new ArrayList<URL>(); for (String descriptorName : deploymentDescriptors) { Enumeration<URL> foundDescriptors; try { foundDescriptors = osgiProcessApplication.getBundle().getResources(descriptorName); while (foundDescriptors.hasMoreElements()) { urls.add(foundDescriptors.nextElement()); } } catch (IOException e) { e.printStackTrace(); } } return urls; } }
OSGiParseProcessesXmlStep extends ParseProcessesXmlStep { @Override protected List<URL> getProcessesXmlUrls(String[] deploymentDescriptors, AbstractProcessApplication processApplication) { OSGiProcessApplication osgiProcessApplication = (OSGiProcessApplication) processApplication; List<URL> urls = new ArrayList<URL>(); for (String descriptorName : deploymentDescriptors) { Enumeration<URL> foundDescriptors; try { foundDescriptors = osgiProcessApplication.getBundle().getResources(descriptorName); while (foundDescriptors.hasMoreElements()) { urls.add(foundDescriptors.nextElement()); } } catch (IOException e) { e.printStackTrace(); } } return urls; }  }
OSGiParseProcessesXmlStep extends ParseProcessesXmlStep { @Override protected List<URL> getProcessesXmlUrls(String[] deploymentDescriptors, AbstractProcessApplication processApplication) { OSGiProcessApplication osgiProcessApplication = (OSGiProcessApplication) processApplication; List<URL> urls = new ArrayList<URL>(); for (String descriptorName : deploymentDescriptors) { Enumeration<URL> foundDescriptors; try { foundDescriptors = osgiProcessApplication.getBundle().getResources(descriptorName); while (foundDescriptors.hasMoreElements()) { urls.add(foundDescriptors.nextElement()); } } catch (IOException e) { e.printStackTrace(); } } return urls; }   }
OSGiParseProcessesXmlStep extends ParseProcessesXmlStep { @Override protected List<URL> getProcessesXmlUrls(String[] deploymentDescriptors, AbstractProcessApplication processApplication) { OSGiProcessApplication osgiProcessApplication = (OSGiProcessApplication) processApplication; List<URL> urls = new ArrayList<URL>(); for (String descriptorName : deploymentDescriptors) { Enumeration<URL> foundDescriptors; try { foundDescriptors = osgiProcessApplication.getBundle().getResources(descriptorName); while (foundDescriptors.hasMoreElements()) { urls.add(foundDescriptors.nextElement()); } } catch (IOException e) { e.printStackTrace(); } } return urls; }    }