UseKeyAsServiceIdValueMatcher implements MetadataValueMatcher { public String getNextServiceId(String serviceKey, KeyValuePairBag mappings) { return StringUtils.defaultIfBlank(serviceKey, null); }  String getNextServiceId(String serviceKey, KeyValuePairBag mappings);  }
@Test public void testMatcher() throws Exception { UseKeyAsServiceIdValueMatcher matcher = new UseKeyAsServiceIdValueMatcher(); assertEquals("key", matcher.getNextServiceId("key", null)); }
@Test public void testMatcherReturnsNull() throws Exception { UseKeyAsServiceIdValueMatcher matcher = new UseKeyAsServiceIdValueMatcher(); assertNull(matcher.getNextServiceId(null, null)); }