RegexMountPointResolvedDstPathReplaceInterceptor implements RegexMountPointInterceptor { public static RegexMountPointResolvedDstPathReplaceInterceptor deserializeFromString(String serializedString) { String[] strings = serializedString .split(Character.toString(RegexMountPoint.INTERCEPTOR_INTERNAL_SEP)); if (strings.length != 3) { return null; } return new RegexMountPointResolvedDstPathReplaceInterceptor(strings[1], strings[2]); } RegexMountPointResolvedDstPathReplaceInterceptor(String srcRegex,
      String replaceString); String getSrcRegexString(); String getReplaceString(); Pattern getSrcRegexPattern(); @Override void initialize(); @Override String interceptSource(String source); @Override String interceptResolvedDestPathStr(
      String parsedDestPathStr); @Override Path interceptRemainingPath(Path remainingPath); @Override RegexMountPointInterceptorType getType(); @Override String serializeToString(); static RegexMountPointResolvedDstPathReplaceInterceptor deserializeFromString(String serializedString);  }
@Test public void testDeserializeFromStringBadCase() throws IOException { String srcRegex = "-"; String replaceString = "_"; String serializedString = createSerializedString(srcRegex, replaceString); serializedString = serializedString + ":ddd"; RegexMountPointResolvedDstPathReplaceInterceptor interceptor = RegexMountPointResolvedDstPathReplaceInterceptor .deserializeFromString(serializedString); Assert.assertNull(interceptor); }