### Question:
ComponentNameComposer { public static Map<String, String> getQueryParamMap(final URI uri) { final Map<String, String> map = new HashMap<String, String>(); for (final String param : uri.getQuery().split("&")) { final String[] nameValue = param.split("="); if (nameValue.length == 2) { map.put(nameValue[0], nameValue[1]); } } return map; } private  ComponentNameComposer(); static String composeComponentUri(final QName serviceName); static QName composeSwitchYardServiceName(
            final String namespace, final String uri, final QName componentName); static Map<String, String> getQueryParamMap(final URI uri);  }### Answer:
@Test public void getQueryParamMap() throws Exception { final Map<String, String> map = getQueryParamMap("switchyard: assertThat(map.size(), is(2)); assertThat(map.get("foo"), equalTo("bar")); assertThat(map.get("bar"), equalTo("baz")); }
@Test public void getQueryParamMap_no_params() throws Exception { assertThat(getQueryParamMap("switchyard: }