### Question:
UriHardModifyProtectionChecker { public boolean isHardModifyProtected(String uri){ return isUriInSet(uri, modifyProtected); }  boolean isHardModifyProtected(String uri);  }### Answer:
@Test public void isHardModifyProtected(){ final String protectedUri = "protectedUri"; final String uriProtectionPattern = ".*pattern.*"; Set<String> patterns = new HashSet<String>(); patterns.add(protectedUri); patterns.add(uriProtectionPattern); checker.modifyProtected = patterns; assertFalse(checker.isHardModifyProtected("nonProtectedUri")); assertTrue(checker.isHardModifyProtected(protectedUri)); assertTrue(checker.isHardModifyProtected("patternProtectedUri1")); assertTrue(checker.isHardModifyProtected("/pattern/Protected/Uri/2")); }