SimpleURLPatternMapper extends BaseURLPatternMapper<T> { @Override protected void put(String urlPattern, T value) throws IllegalArgumentException { if (Objects.isNull(urlPattern) || (urlPattern.length() == 0)) { throw new IllegalArgumentException("URL pattern is blank"); } if (isWildcardURLPattern(urlPattern)) { _wildcardURLPatternValues.put(urlPattern, value); return; } if (isExtensionURLPattern(urlPattern)) { _extensionURLPatternValues.put(urlPattern, value); return; } _exactURLPatternValues.put(urlPattern, value); } SimpleURLPatternMapper(Map<String, T> values); @Override T getValue(String urlPath);  }
@Test public void testConstructor() { try { createURLPatternMapper( new HashMap() { { put("", ""); } }); Assert.fail(); } catch (IllegalArgumentException illegalArgumentException) { } try { createURLPatternMapper( new HashMap() { { put(null, "null"); } }); Assert.fail(); } catch (IllegalArgumentException illegalArgumentException) { } }