RegexMountPointResolvedDstPathReplaceInterceptor implements RegexMountPointInterceptor { @Override public String serializeToString() { return REPLACE_RESOLVED_DST_PATH.getConfigName() + RegexMountPoint.INTERCEPTOR_INTERNAL_SEP + srcRegexString + RegexMountPoint.INTERCEPTOR_INTERNAL_SEP + replaceString; } 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 testSerialization() { String srcRegex = "word1"; String replaceString = "word2"; String serializedString = createSerializedString(srcRegex, replaceString); RegexMountPointResolvedDstPathReplaceInterceptor interceptor = new RegexMountPointResolvedDstPathReplaceInterceptor(srcRegex, replaceString); Assert.assertEquals(interceptor.serializeToString(), serializedString); }